Static methods

staticfromHex(algorithm:String, hash:String):Null<Hash>

Create a new Hash from a hex string

Parameters:

algorithm

name per https://xmpp.org/extensions/xep-0300.html

hash

in hex format

Returns:

Hash or null on error

staticfromUri(uri:String):Null<Hash>

Create a new Hash from a ni:, cid: or similar URI

Parameters:

uri

The URI

Returns:

Hash or null on error

Variables

finalalgorithm:String

Hash algorithm name

Methods

toBase64():String

Represent this Hash as a Base64 string

Returns:

Base64-encoded string

toBase64Url():String

Represent this Hash as a Base64url string

Returns:

Base64url-encoded string

toHex():String

Represent this Hash as a hex string

Returns:

hex string

toUri():String

Represent this Hash as a URI

Returns:

URI as a string