Crypto.Hash

From Xojo Documentation

Method

Crypto.Hash(data As MemoryBlock, hashAlgorithm As Crypto.HashAlgorithms) As MemoryBlock

New in 2019r2.1

Supported for all project types and targets.

Creates a hash value for the data using the specified hashAlgorithm.


Method

Crypto.Hash(data As MemoryBlock, hashAlgorithm As Crypto.Algorithm) As MemoryBlock

New in 2012r2

Supported for all project types and targets.

Creates a hash value for the data using the specified hashAlgorithm.

Notes

See the Crypto.HashAlgorithms enumeration for values that can be used specify the type of Hash.

Sample Code

This code calculates a hash for a password using SHA512:

Var hash As String
hash = Crypto.Hash("YourPasswordSentence", Crypto.HashAlgorithms.SHA512)