TMessageDigest
An abstract base type for message digest implementations.
Methods
Method Digest:String(data:String)
Calculates a digest for the given String input data.
Returns
A String representation of the digest.
Example
SuperStrict
Framework brl.standardio
Import Crypto.SHA256Digest
Local data:String = "Hello World!"
Local digest:TMessageDigest = GetMessageDigest("sha-256")
If digest Then
Print digest.Digest(data)
End If
Method Digest:String(stream:TStream)
Calculates a digest for the given TStream input stream.
Returns
A String representation of the digest.
Example
SuperStrict
Framework brl.standardio
Import Crypto.SHA256Digest
Local data:TStream = ReadStream("data.txt")
Local digest:TMessageDigest = GetMessageDigest("sha-256")
If digest Then
Print digest.Digest(data)
End If
data.Close()
Method DigestBytes:Byte[](data:String)
Calculates a digest for the given String input data.
Returns
A byte array representation of the digest.
Method DigestBytes:Byte[](stream:TStream)
Calculates a digest for the given TStream input stream.
Returns
A bytes array representation of the digest.