Options
All
  • Public
  • Public/Protected
  • All
Menu

Module utils/hash

Index

Functions

Const hmacSHA512

  • hmacSHA512(key: Uint8Array, buffer: Uint8Array): Uint8Array
  • Hash a buffer with provided key using HMAC-SHA512.

    Parameters

    • key: Uint8Array
    • buffer: Uint8Array

    Returns Uint8Array

Const keccak256

  • keccak256(input: string | number | bigint | ArrayBufferLike | number[]): Uint8Array
  • Returns the Keccak-256 hash of a string, as a hexadecimal string.

    Parameters

    • input: string | number | bigint | ArrayBufferLike | number[]

    Returns Uint8Array

Const pbkdf2

  • pbkdf2(buffer: Uint8Array, salt: Uint8Array, iterations?: number, length?: number, digest?: string): Uint8Array
  • Derive a key from a buffer and salt. Defaults to 2048 iterations, 64 byte key length and SHA512 as digest.

    Parameters

    • buffer: Uint8Array
    • salt: Uint8Array
    • iterations: number = 2048
    • length: number = 64
    • digest: string = 'sha512'

    Returns Uint8Array

Const ripemd160

  • ripemd160(buffer: Uint8Array): Uint8Array
  • Hash a buffer using RIPEMD160.

    Parameters

    • buffer: Uint8Array

    Returns Uint8Array

Const sha256

  • sha256(buffer: Uint8Array): Uint8Array
  • Hash a buffer using SHA256.

    Parameters

    • buffer: Uint8Array

    Returns Uint8Array

Generated using TypeDoc