Home | Platform SDK

Hash

The Hash class provides methods to extract the numerical value out of any currency representation by normalising the input and removing any locale specific rules like symbols and use of commas.

Importing the Hash class

import { Hash } from "@arkecosystem/platform-sdk-crypto";

Hash a value with the RIPEMD160 algorithm

Hash.ripemd160(someBuffer);

Hash a value with the SHA1 algorithm

Hash.sha1(someBuffer);

Hash a value with the SHA256 algorithm

Hash.sha256(someBuffer);

Hash a value with the HASH160 algorithm

Hash.hash160(someBuffer);

Hash a value with the HASH256 algorithm

Hash.hash256(someBuffer);

2020 © ARK.io | All rights reserved | An ARK.io Product