import { type KeyLike } from "https://deno.land/x/faster@v11.7/vendor/jose/types.d.ts";
KeyLike are runtime-specific classes representing asymmetric keys or symmetric secrets. These are instances of !CryptoKey and additionally !KeyObject in Node.js runtime. !Uint8Array instances are also accepted as symmetric secret representation only.
key/import | Key Import Functions can be used to import PEM, or JWK formatted asymmetric keys and certificates to these runtime-specific representations.
In Node.js the !Buffer class is a subclass of !Uint8Array and so !Buffer can be provided for symmetric secrets as well.
!KeyObject is a representation of a key/secret available in the Node.js runtime. In addition to the key/import | Key Import Functions you may use the runtime APIs !createPublicKey, !createPrivateKey, and !createSecretKey to obtain a !KeyObject from your existing key material.
!CryptoKey is a representation of a key/secret available in the Browser and Web-interoperable runtimes. In addition to the key/import | Key Import Functions you may use the !SubtleCrypto.importKey API to obtain a !CryptoKey from your existing key material.