You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the API documentation we find key.prototype.decrypt. However, there is no accompanying key.prototype.encrypt for Key objects.
Either this was a specific design choice or it is genuinely missing – please advise.
The current code I use to preform key.encrypt(passphrase) looks like:
// lockKeyRing encrypts the private key material of the key using the passed // password. The primary key and all subkeys are encrypted with the password.// { string -> bool }functionlockKeyRing(password){varw=true;w=w&&keyRing.privateKey.primaryKey.encrypt(password);keyRing.privateKey.subKeys.forEach(function(sk){w=w&&sk.subKey.encrypt(password);});returnw;}
Note that the keyRing here is a custom data structure.
P.S. Thanks for the library it is fantastic!
The text was updated successfully, but these errors were encountered:
In the API documentation we find
key.prototype.decrypt
. However, there is no accompanyingkey.prototype.encrypt
forKey
objects.Either this was a specific design choice or it is genuinely missing – please advise.
The current code I use to preform key.encrypt(passphrase) looks like:
Note that the keyRing here is a custom data structure.
P.S. Thanks for the library it is fantastic!
The text was updated successfully, but these errors were encountered: