Ƭ KeyLike: KeyObject | CryptoKey | Uint8Array
Defined in src/types.d.ts:96
KeyLike are platform-specific references to keying material.
- KeyObject instances come from node's crypto module (see crypto.generateKeyPair, crypto.createPublicKey, crypto.createPrivateKey, crypto.createSecretKey).
- CryptoKey instances come from Web Cryptography API (see SubtleCrypto.importKey, SubtleCrypto.generateKey, SubtleCrypto.deriveKey, SubtleCrypto.unwrapKey).
- Uint8Array is used exclusively for symmetric secret representations, a CryptoKey or KeyObject is preferred, but in Web Crypto API this isn't an option for some algorithms.