hammerspoon2-docs
    Preparing search index...

    Function digest

    • Generate the hash of some bytes, as bytes

      Parameters

      • algorithm: "MD5" | "SHA1" | "SHA256" | "SHA512"

        The hash algorithm

      • data: string | number[] | ArrayBuffer | Uint8Array<ArrayBufferLike>

        The bytes to hash. A string is hashed as UTF-8

      Returns Uint8Array

      The hash

      Throws an Error on failure; wrap calls in try/catch to handle it.