The SHA1AsHex(...) function has two variations, not counting syntax variations. It is used to encrypt a String using the standard SHA1 encryption algorithm.  The resulting bytes are then converted back into a String by encoding each byte as a two digit hexidecimal number.  When converting the String into bytes prior to encryption, an optional charset may be specified.  The default charset is UTF-8.

Syntax:
SHA1AsHex( input-string )
SHA1AsHex(
input-string, charset )
input-string.SHA1AsHex()
input-string.SHA1AsHex( charset )

Parameter Description
input-string The String value to be encrypted.
charset The charset to use, prior to encryption, when converting the String value into bytes.  The default is UTF-8.