Library API
    Preparing search index...

    Function importPublicKey

    • Imports a PEM-formatted public key string into a native Web Crypto API CryptoKey object.

      Parameters

      • pem: string

        The PEM-formatted public 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