Options
All
  • Public
  • Public/Protected
  • All
Menu

ion-hash-js

Index

Functions

cryptoHasherProvider

  • A HasherProvider implementation backed by node's crypto module.

    throws

    if the specified algorithm isn't supported

    Parameters

    • algorithm: string

      specifies the algorithm to use when invoking crypto.createHash() (e.g., 'sha1', 'md5', 'sha256', 'sha512')

    Returns HasherProvider

digest

  • digest(value: any, algorithm: string): Uint8Array
  • Computes the Ion hash of a value using the specified hash algorithm. The algorithm must be known to node's crypto module.

    throws

    if the specified algorithm isn't supported

    Parameters

    • value: any

      the native JavaScript value or instance of ion-js's dom.Value to be hashed

    • algorithm: string

      specifies the algorithm to use when invoking crypto.createHash() (e.g., 'sha1', 'md5', 'sha256', 'sha512')

    Returns Uint8Array

    bytes representing the Ion hash of the value

makeHashReader

makeHashWriter