The function crypt.digest.sha is used to compress.
1 crypt.digest.sha
<crypt.digest.sha>
<var /> !
</crypt.digest.sha>
Arguments | |||||
---|---|---|---|---|---|
Name | Type | Required | Unique | Nullable | Description |
Evar | Entry variable. |
Returns | |
---|---|
Type | Description |
String | Returns a String with the result of the encryption. |
Remarks
Encrypt a text in SHA-1 code.
Exceptions
requires 1 argument
The entry parameter has not been specified.
Example
Encrypt the text 'hello', passing the argument as String and as byte [] (file.read).
Copy
<xsql-script name='crypt_sha_sample1'> <body> <file.chars.write encoding-src='ISO-8859-1' encoding-dst='ISO-8859-1'> <file name='file' create='true' delete='false' type='absolute' /> <string>Hello world!</string> </file.chars.write> <set name='str'> <file.chars.read> <file name='file' create='true' delete='false' type='absolute' /> </file.chars.read> </set> <set name='crypt_str'> <crypt.digest.sha> <str /> </crypt.digest.sha> </set> <println><str /></println> <println><crypt_str /></println> </body> </xsql-script>