Deprecated
Use KemInterface.generateKeyPair instead.
import { CipherSuite } from "https://deno.land/x/hpke@1.2.9/mod.ts";
Imports a public or private key and converts to a CryptoKey.
Since key parameters for createSenderContext or createRecipientContext are CryptoKey format, you have to use this function to convert provided keys to CryptoKey.
Basically, this is a thin wrapper function of SubtleCrypto.importKey.
If the error occurred, throws DeserializeError.
Parameters
key: ArrayBuffer | JsonWebKey
A byte string of a raw key or A JsonWebKey object.