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
134 stars 46 forks source link

classes that support shortened number of parameters #123

Open andyrozman opened 1 year ago

andyrozman commented 1 year ago

So I was translating application from C# to Java and noticed that dotNet Sodium has helper methods that support encrypting/decrypting with short list of parameters... It would be nice to have something like that in LazySodium...

For example there is class SecretAeadXChaCha20Poly1305, that support e/d with just 4 parameters ( byte[] message, byte[] nonce, byte[] key, byte[] additionalData), which then of course calls the same underlaying Sodium method crypto_aead_xchacha20poly1305_ietf_encrypt...

Are there plans on doing something like that? I converted C# class now to Java, but my knowledge of Sodium/C and Java binding is too little, to know if this will actually work like it should...