StaticlockLock (encrypt) a content key using custom derivation parameters.
The key derivation parameters to use
The secret (password or key material) to derive from
The symmetric key to encrypt
The encrypted key
StaticlockLock (encrypt) a content key using a specific derivation method with defaults.
The key derivation method to use
The secret (password or key material) to derive from
The symmetric key to encrypt
The encrypted key
Returns the encrypted message.
Returns the key derivation parameters.
Returns the key derivation method.
Check if this uses a password-based key derivation method.
Check if this uses SSH Agent for key derivation.
Note: SSH Agent key derivation is not yet functional in TypeScript. This method is useful for detecting envelopes locked by other implementations (e.g., Rust).
Unlock (decrypt) the content key.
The secret (password or key material) used to lock
The decrypted symmetric key
Get string representation.
Returns the CBOR tags associated with EncryptedKey.
Returns the untagged CBOR encoding. The EncryptedMessage is encoded with its own tag (40002).
Returns the tagged CBOR encoding.
Returns the tagged value in CBOR binary representation.
Creates an EncryptedKey by decoding it from untagged CBOR.
Creates an EncryptedKey by decoding it from tagged CBOR.
StaticfromStaticfromStatic method to decode from tagged CBOR binary data.
StaticfromStatic method to decode from untagged CBOR binary data.
Returns the UR representation.
Returns the UR string representation.
StaticfromStaticfrom
Encrypted key providing secure storage of symmetric keys.
Use
lock()to encrypt a content key with a password or secret, andunlock()to decrypt it.