Registry / crypto / jnacl
library1.0.0javamavenunverified

Pure Java implementation of the NaCl networking and cryptography library.

<dependency> <groupId>eu.neilalexander</groupId> <artifactId>jnacl</artifactId> <version>1.0.0</version> </dependency>
INSTALL
IMPORT
SIG · JNACL
J
jnacl
cryptojavav1.0.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

curve25519xsalsa20poly1305
eu.neilalexander.jnacl.crypto.curve25519xsalsa20poly1305

Encrypt a message using NaCl's secretbox (XSalsa20-Poly1305).

import eu.neilalexander.jnacl.crypto.curve25519xsalsa20poly1305; byte[] key = new byte[32]; byte[] nonce = new byte[24]; byte[] plaintext = "Hello, NaCl!".getBytes(); byte[] ciphertext = new byte[plaintext.length + 16]; curve25519xsalsa20poly1305 crypto = new curve25519xsalsa20poly1305(); crypto.crypto_secretbox(ciphertext, plaintext, plaintext.length, nonce, key); System.out.println("Encrypted successfully");
Debug
Known issues

No known issues recorded.

Upgrade
Version history
1.0.0latest on Maven
Audit
Dependencies

No dependency data recorded yet.

Agent activity
12 hits · last 30 days
node
12
Resources
jnacl — mvn dependency:get jnacl · libregistry