Login    Sites MenuBlueStep

BlueStep Platform Support

RelateScript
Outline full outline 
Overview 
Data Types 
Operators 
Statements 
Functions 
Data Conversion 
String Functions 
compareToIgnoreCase(...) 
escapeJS(...) 
indexOf(...) 
lastIndexOf(...) 
isKey(...) 
matches(...) 
nullOrEmpty(...) 
pad(...) 
replace(...) 
secureHash(...) 
SHA1AsBase64(...) 
SHA1AsHex(...) 
substring(...) 
toLowerCase(...) 
toTitleCaps(...) 
toUpperCase(...) 
trim(...) 
xssHtmlSafe(...) 
xssSafe(...) 
HTML/CSS/JavaScript 
Array Functions 
Date/Time Functions 
Mathematical Functions 
Advanced Functions 
Restricted Functions 
Working with Relate Data 
How Formulas Work 
Related Topics 

The SHA1AsBase64(...) 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 using a Base64 encoding with the optional URL safe dictionary.  When converting the String into bytes prior to encryption, an optional charset may be specified.  The default charset is UTF-8.

The URL safe Base64 dictionary uses "." in place of "+" and "-" in place of "/".  Also, it does not pad the final output to an even multiple of 4 characters using equal signs.

Syntax:
SHA1AsBase64( input-string )
SHA1AsBase64( 
input-stringcharset )
input-string.SHA1AsBase64()
input-string.SHA1AsBase64( 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.