laysakura / serde-encrypt

🔐 Encrypts all the Serialize.
Apache License 2.0
177 stars 6 forks source link

How to construct a `SenderPublicKey` from a `String`? #113

Open jymchng opened 1 year ago

jymchng commented 1 year ago

Hi let's say the key exchange was meant to be conducted by sending String, which is a base64 encoding of the SharedKey, over to the receiver.

Sender would need the receiver's PublicKey which is sent to the sender through a base64 encoded string.

However, there is a no method of conversion from SecretKey to PublicKey then to ReceiverPublicKey.

How can I get an instance of ReceiverPublicKey to generate CombinedSharedKey as it is done in one of your tests?