Skip to content
This repository was archived by the owner on Mar 6, 2024. It is now read-only.

CryptoDigest Methods

Daniel Linsley edited this page May 15, 2017 · 1 revision

Digest

Methods to hash data with different digests.

CryptoDigest.hmacMd5

Creates a MD5 based Hashed Message Authentication Code (HMAC) Base64 encoded.

Signature

String CryptoDigest.hmacMd5(String keyB64, dataB64)

Parameters

Name Type Description
keyB64 String Base64 encoded secret key
dataB64 String Base64 encoded data to sign

CryptoDigest.hmacSha1

Creates a SHA-1 based Hashed Message Authentication Code (HMAC) Base64 encoded.

Signature

String CryptoDigest.hmacSha1(String keyB64, dataB64)

Parameters

Name Type Description
keyB64 String Base64 encoded secret key
dataB64 String Base64 encoded data to sign

CryptoDigest.hmacSha256

Creates a SHA-256 based Hashed Message Authentication Code (HMAC) Base64 encoded.

Signature

String CryptoDigest.hmacSha256(String keyB64, dataB64)

Parameters

Name Type Description
keyB64 String Base64 encoded secret key
dataB64 String Base64 encoded data to sign

CryptoDigest.hmacSha384

Creates a SHA-384 based Hashed Message Authentication Code (HMAC) Base64 encoded.

Signature

String CryptoDigest.hmacSha384(String keyB64, dataB64)

Parameters

Name Type Description
keyB64 String Base64 encoded secret key
dataB64 String Base64 encoded data to sign

CryptoDigest.hmacSha512

Creates a SHA-512 based Hashed Message Authentication Code (HMAC) Base64 encoded.

Signature

String CryptoDigest.hmacSha512(String keyB64, dataB64)

Parameters

Name Type Description
keyB64 String Base64 encoded secret key
dataB64 String Base64 encoded data to sign

CryptoDigest.md5

Creates a Base64 encoded 128 bit MD5 hash from plain string.

Signature

String CryptoDigest.md5(String data)

Parameters

Name Type Description
data String Plain string data to hash

CryptoDigest.md5Base64

Creates a Base64 encoded 128 bit MD5 hash from Base64 encoded data. Compatible with non-string data

Signature

String CryptoDigest.md5Base64(String dataB64)

Parameters

Name Type Description
dataB46 String Base64 encoded data to hash

CryptoDigest.sha1

Creates a Base64 encoded 160 bit SHA-1 hash from plain string.

Signature

String CryptoDigest.sha1(String data)

Parameters

Name Type Description
data String Plain string data to hash

CryptoDigest.sha1Base64

Creates a Base64 encoded 160 bit SHA-1 hash from Base64 encoded data. Compatible with non-string data

Signature

String CryptoDigest.sha1Base64(String dataB64)

Parameters

Name Type Description
dataB46 String Base64 encoded data to hash

CryptoDigest.sha256

Creates a Base64 encoded 256 bit SHA-256 hash from plain string.

Signature

String CryptoDigest.sha256(String data)

Parameters

Name Type Description
data String Plain string data to hash

CryptoDigest.sha256Base64

Creates a Base64 encoded 256 bit SHA-256 hash from Base64 encoded data. Compatible with non-string data

Signature

String CryptoDigest.sha256Base64(String dataB64)

Parameters

Name Type Description
dataB46 String Base64 encoded data to hash

CryptoDigest.sha384

Creates a Base64 encoded 384 bit SHA-384 hash from plain string.

Signature

String CryptoDigest.sha384(String data)

Parameters

Name Type Description
data String Plain string data to hash

CryptoDigest.sha384Base64

Creates a Base64 encoded 384 bit SHA-384 hash from Base64 encoded data. Compatible with non-string data

Signature

String CryptoDigest.sha384Base64(String dataB64)

Parameters

Name Type Description
dataB46 String Base64 encoded data to hash

CryptoDigest.sha512

Creates a Base64 encoded 512 bit SHA-512 hash from plain string.

Signature

String CryptoDigest.sha512(String data)

Parameters

Name Type Description
data String Plain string data to hash

CryptoDigest.sha512Base64

Creates a Base64 encoded 512 bit SHA-512 hash from Base64 encoded data. Compatible with non-string data

Signature

String CryptoDigest.sha512Base64(String dataB64)

Parameters

Name Type Description
dataB46 String Base64 encoded data to hash