@Test public void openingBoxFailsIfInputLengthTooSmall() { final int success = this.secretBox .cryptoBoxOpenAfternm(new byte[0], new byte[0], 0, new byte[0], new byte[0]); assertThat(success).isEqualTo(-1); }
@Override public int cryptoBoxOpenAfternm(final byte[] output, final byte[] message, final int messageLength, final byte[] nonce, final byte[] sharedKey) { return curve25519xsalsa20poly1305.crypto_box_open_afternm(output, message, messageLength, nonce, sharedKey); }
JnaclSecretBox implements SecretBox { @Override public int cryptoBoxOpenAfternm(final byte[] output, final byte[] message, final int messageLength, final byte[] nonce, final byte[] sharedKey) { return curve25519xsalsa20poly1305.crypto_box_open_afternm(output, message, messageLength, nonce, sharedKey); } }
JnaclSecretBox implements SecretBox { @Override public int cryptoBoxOpenAfternm(final byte[] output, final byte[] message, final int messageLength, final byte[] nonce, final byte[] sharedKey) { return curve25519xsalsa20poly1305.crypto_box_open_afternm(output, message, messageLength, nonce, sharedKey); }  }
JnaclSecretBox implements SecretBox { @Override public int cryptoBoxOpenAfternm(final byte[] output, final byte[] message, final int messageLength, final byte[] nonce, final byte[] sharedKey) { return curve25519xsalsa20poly1305.crypto_box_open_afternm(output, message, messageLength, nonce, sharedKey); }  @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 cryptoBoxOpenAfternm(final byte[] output, final byte[] message, final int messageLength, final byte[] nonce, final byte[] sharedKey) { return curve25519xsalsa20poly1305.crypto_box_open_afternm(output, message, messageLength, nonce, sharedKey); }  @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);  }