nacl4s
nacl4s copied to clipboard
_easy interfaces
nacl4s is a fantastic project, thank you so much for working on this! A pure Scala (hence pure Java bytecode) implementation is definitely going to be very useful.
Just a request: could you possibly add the _easy
API to crypto_box
and crypto_secretbox
?
From a user perspective, the original API with the extra padding is painful to use, error-prone and doesn't make sense in a language without pointer arithmetic. None of the bindings for non-C languages require padding and the kung-fu it then requires to remove it.
@jedisct1 I believe it would help if you described such an API.
Hi Afiskon,
http://doc.libsodium.org/secret-key_cryptography/authenticated_encryption.html
crypto_secretbox_easy()
puts the authenticator followed by the ciphertext into the target buffer, crypto_secretbox_open_easy
() is the reverse operation.
http://doc.libsodium.org/public-key_cryptography/authenticated_encryption.html
crypto_box_easy()
, crypto_box_open_easy()
, crypto_box_easy_afternm()
are the counterparts for public-key encryption.
@jedisct1 thank you for your interest, I will add it in new version