Skip to content

Hash

Returns hash of given content

1
$Crypto.Hash(content: string, hashName: Digest):string

Parameters

string content
    Content to be hashed

Digest hashName
    Name of hash algorithm to be used. If not specified SHA1 is used.

Returns

Hash of given content in base64 encoding

Remarks

Hash a content with SHA1 algorithm

1
var hashedContent = $Crypto.Hash('data to be hashed','SHA1')

Types

Digest

Types of digest algorithms

( "SHA1" | "SHA256" | "SHA384" | "SHA512" )