class Hash
(source)
Various utilities for providing hashes (digests) of arbitrary data. Requires the BouncyCastleProvider to be loaded and available. See https://www.bouncycastle.org/wiki/display/JA1/Provider+Installation for detail.
static fun digestUsingAlgorithm(input: ByteArray, alg: String): ByteArray static fun digestUsingAlgorithm(input: Bytes, alg: String): Bytes
Helper method to generate a digest using the provided algorithm. |
|
static fun keccak256(input: ByteArray): ByteArray static fun keccak256(input: Bytes): Bytes32
Digest using keccak-256. |
|
static fun keccak512(input: ByteArray): ByteArray static fun keccak512(input: Bytes): Bytes
Digest using keccak-512. |
|
static fun sha2_256(input: ByteArray): ByteArray static fun sha2_256(input: Bytes): Bytes32
Digest using SHA2-256. |
|
static fun sha2_512_256(input: ByteArray): ByteArray
Digest using SHA2-512/256. static fun sha2_512_256(input: Bytes): Bytes32
Digest using SHA-512/256. |
|
static fun sha3_256(input: ByteArray): ByteArray static fun sha3_256(input: Bytes): Bytes32
Digest using SHA3-256. |
|
static fun sha3_512(input: ByteArray): ByteArray static fun sha3_512(input: Bytes): Bytes
Digest using SHA3-512. |