SHA
PowerScript function
Description
Calculates the SHA value of a blob.
Applies to
CrypterObject objects
Syntax
1 |
crypter.SHA ( algorithm, variable) |
Argument |
Description |
---|---|
crypter |
The name of the CrypterObject object |
algorithm |
A value of the SHAAlgorithm enumerated type that specifies Values are:
|
variable |
A blob whose value is the data you want to process with When using the system blob function to convert a string to |
Return value
Blob. Returns the result of the SHA 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 SHA1.
1 2 3 4 5 6 7 8 9 10 |
Blob lblb_data Blob lblb_sha1 lblb_data = Blob("Test SHA1", EncodingANSI!) CrypterObject lnv_CrypterObject lnv_CrypterObject = Create CrypterObject // Encrypt with SHA lblb_sha1= lnv_CrypterObject.SHA(SHA1!, lblb_data) |
See also