Key
Key
Summary
| Method | |
|---|---|
| Set | |
| Property | |
|---|---|
| Type | |
The Key object is used for protecting the integrity of data ("message authentication"), such as protecting signature data from malicious or accidental tampering. Supported key types include a simple MD5-based key and a more secure Message Authentication Code (MAC) key derived from MD5. The latter requires an application-defined key value – a "password string", which (for security reasons) is best stored in a separate file or input by the user at runtime and not hard-coded in the application itself.
Methods
Set
Initializes the Key by setting its type and, optionally, initialization value.
| void Set(Type, Value) | |
|---|---|
| Parameters | |
| Type | KeyType Enum specifying the type of key. |
| Value | Value to use to initialize the key. Must be omitted for key types KeyNone and KeyMD5. For KeyMD5MAC, must be either a 16-byte array (BYTE(16) in VB) or a 16-character string. Note that the (Unicode) string is converted to multibyte, so only those characters that convert to a single byte should be used. (Optional) |
| Return Value | |
| None | |
Properties
| Property | Property Type | Description |
|---|---|---|
Type | KeyType (Enum) | Gets the type of key. See Enumerator Types for possible values. Default = KeyNone.(Read-only) |