SHA1DIGEST
Performs a SHA-1 hash of the text specified by an address and length and returns a CHAR(20) string with that hash value.
- p
- A pointer that specifies the address of a buffer to be hashed.
- n
- An expression that specifies the length (in bytes) of that buffer. It must have a computational type and will be converted to type size_t.
SHA1DIGEST returns a CHAR(20) value.
This function generates code that executes the KLMD assembler instruction.
Examples
The following example performs a SHA-1 hash of the text in a CHARACTER variable c.
dcl encoded char(20);
encoded = sha1digest(addrdata(c), length(c));