@Test public void generatingNewKeysSucceedsIfArraysAreBigEnough() { final byte[] publicKey = new byte[crypto_secretbox_PUBLICKEYBYTES]; final byte[] privateKey = new byte[crypto_secretbox_SECRETKEYBYTES]; final int success = this.secretBox.cryptoBoxKeypair(publicKey, privateKey); assertThat(success).isEqualTo(0); }
@Override public int cryptoBoxKeypair(final byte[] publicKey, final byte[] privateKey) { return curve25519xsalsa20poly1305.crypto_box_keypair(publicKey, privateKey); }
JnaclSecretBox implements SecretBox { @Override public int cryptoBoxKeypair(final byte[] publicKey, final byte[] privateKey) { return curve25519xsalsa20poly1305.crypto_box_keypair(publicKey, privateKey); } }
JnaclSecretBox implements SecretBox { @Override public int cryptoBoxKeypair(final byte[] publicKey, final byte[] privateKey) { return curve25519xsalsa20poly1305.crypto_box_keypair(publicKey, privateKey); }  }
JnaclSecretBox implements SecretBox { @Override public int cryptoBoxKeypair(final byte[] publicKey, final byte[] privateKey) { return curve25519xsalsa20poly1305.crypto_box_keypair(publicKey, privateKey); }  @Override int cryptoBoxBeforenm(final byte[] output, final byte[] publicKey, final byte[] privateKey); @Override int cryptoBoxAfternm(final byte[] output, final byte[] message, final int messageLength, final byte[] nonce, final byte[] sharedKey); @Override int cryptoBoxOpenAfternm(final byte[] output, final byte[] message, final int messageLength, final byte[] nonce, final byte[] sharedKey); @Override int cryptoBoxKeypair(final byte[] publicKey, final byte[] privateKey); }
JnaclSecretBox implements SecretBox { @Override public int cryptoBoxKeypair(final byte[] publicKey, final byte[] privateKey) { return curve25519xsalsa20poly1305.crypto_box_keypair(publicKey, privateKey); }  @Override int cryptoBoxBeforenm(final byte[] output, final byte[] publicKey, final byte[] privateKey); @Override int cryptoBoxAfternm(final byte[] output, final byte[] message, final int messageLength, final byte[] nonce, final byte[] sharedKey); @Override int cryptoBoxOpenAfternm(final byte[] output, final byte[] message, final int messageLength, final byte[] nonce, final byte[] sharedKey); @Override int cryptoBoxKeypair(final byte[] publicKey, final byte[] privateKey);  }