Home > borogove > Hash > fromHex

Hash.fromHex() method

Create a new Hash from a hex string

Signature:

static fromHex(algorithm: string, hash: string): borogove.Hash | null;

Parameters

Parameter Type Description
algorithm string name per https://xmpp.org/extensions/xep-0300.html
hash string in hex format

Returns:

borogove.Hash | null

Hash or null on error