Function getHMACKey

  • get HMAC key object

    Parameters

    • alg: string

      HMAC algorithm name ("hmacSHA{1,256,384,512}")

    • hKey: string

      hexadecimal string of HMAC key

    Returns Promise<CryptoKey>

    HMAC key object

    Description

    This function generates CryptoKey object with specified HMAC algorithm and a hexadecimal string of HMAC key value.

    See

    getNewHMACKey

    Example

    await getHMACKey("hmacSHA256", "3b6839...") -> CryptoKey object