terl / lazysodium-java

A Java implementation of the Libsodium crypto library. For the lazy dev.
https://github.com/terl/lazysodium-java/wiki
Mozilla Public License 2.0
135 stars 47 forks source link

cryptoSign vs cryptoSignOpen #61

Closed phxql closed 4 years ago

phxql commented 4 years ago

Hi,

String cryptoSign(String message, String secretKey) throws SodiumException;

takes a String secret key, while

String cryptoSignOpen(String signedMessage, Key publicKey);

takes a Key public key.

Maybe add an overload

String cryptoSign(String message, Key secretKey) throws SodiumException;

to the API? Otherwise i have to think about how to get a String from Key. Doable, but not pretty.

Thanks!

gurpreet- commented 4 years ago

Hi @phxql,

Thank you for your request to add a new overloaded method. I've added the cryptoSign(String message, Key secretKey) method and it's available in version 4.2.4.

Enjoy!

phxql commented 4 years ago

Great, thanks a lot!