Closed wivaku closed 3 years ago
There are two ways to get what you want.
https://github.com/paragonie/halite/blob/master/doc/Classes/KeyFactory.md#deriveencryptionkeypair
With the current edition of Halite, you can derive a given keypair from a password and salt.
secretKey
.There is no concept of a password-protected (but not derived) key in Halite 4.
The Derivation Way is a good workaround. That will do the trick, thanks.
For my keypair: would like to password protect my
secretKey
, similar to openssl_pkey_export. This so that I need bothsecretKey
and the correct password to decrypt a message.And additionally, would like to be able to change the password for that
secretKey
without changing thepublicKey
.Can this be done?