HMAC
PowerScript function
Description
Calculates the HMAC value of a blob.
Applies to
CrypterObject object
Syntax
|
1 |
crypter.HMAC ( algorithm, variable, key) |
|
Argument |
Description |
|---|---|
|
crypter |
The name of the CrypterObject object. |
|
algorithm |
A value of the HMACAlgorithm enumerated type that Values
|
|
variable |
A blob whose value is the data you want to process When using the system blob function to |
|
key |
A blob specifying the secret key. |
Return value
Blob. Returns the result of the HMAC if it succeeds. If any
argument’s value is null, the method returns null. If an error occurs,
throw the exception.
Examples
This statement encrypts the data using HMACMD5.
|
1 2 3 4 5 6 7 8 9 10 11 12 |
Blob lblb_data Blob lblb_key Blob lblb_hmac lblb_data = Blob("Test HMAC", EncodingANSI!) lblb_key = Blob("Test HMAC Key", EncodingANSI!) CrypterObject lnv_CrypterObject lnv_CrypterObject = Create CrypterObject // Encrypt with HMAC lblb_hmac= lnv_CrypterObject.HMAC(HMACMD5!, lblb_data, lblb_key) |
See also