Library API
    Preparing search index...

    Function importPrivateKey

    • Imports a PKCS#8 PEM-formatted private key string into a native Web Crypto API CryptoKey object.

      Parameters

      • pem: string

        The PEM-formatted private key string

      • alg: string = keys.SignKey

        The signature algorithm identifier (default: keys.SignKey)

      • hash: string = keys.Algorithm

        The hash algorithm identifier (default: keys.Algorithm)

      Returns Promise<CryptoKey>

      A promise resolving to the imported CryptoKey