# KeyHelper Class A class that contains methods for managing key creation and validation against a master key. ## Definition **Namespace:** CapyKit.Helpers **Assembly:** CapyKit (in CapyKit.dll) Version: 1.0.4 **C#** ``` C# public class KeyHelper ``` **F#** ``` F# type KeyHelper = class end ```
Inheritance | Object → KeyHelper |
KeyHelper | Initializes a new instance of the KeyHelper class |
BytesToHex | Converts a byte array to a hex string. |
ComputeSignature | Computes an HMAC-SHA256 over the salt using the master key and truncates it to the same number of bytes as the salt. |
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object) |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object) |
FormatKey | Formats the given hex string into the desired number of parts (separated by dashes). |
GenerateKey | Generates a random key. |
GetHashCode | Serves as the default hash function. (Inherited from Object) |
GetMasterKey | Gets the master key. |
GetNumParts | Gets the number parts. |
GetSaltSize | Gets the salt size. |
GetType | Gets the Type of the current instance. (Inherited from Object) |
HexToBytes | Converts a hex string back to a byte array. |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object) |
SetMasterKeyAccessor | Sets the master key. |
SetNumPartsAccessor | Set and get the number of parts for the formatted key. Default is 2. |
SetSaltSizeAccessor | Sets the salt size (in bytes). Default is 4. |
ToString | Returns a string that represents the current object. (Inherited from Object) |
ValidateKey | Validates the provided key. |
masterKeyAccessor | The master key accessor function. |
numPartsAccessor | Number of parts accessor function. |
saltSizeAccessor | The salt size accessor function. |
UpdateProperties | An object extension method that updates the properties of a given target object with the values from a given source object. (Defined by ObjectExtensions) |