// Path: src/main/java/org/abstractj/kalium/NaCl.java
// public static Sodium sodium() {
//     Sodium sodium = SingletonHolder.SODIUM_INSTANCE;
//     checkVersion(sodium);
//     return sodium;
// }
// 
// Path: src/main/java/org/abstractj/kalium/keys/KeyPair.java
// public class KeyPair {
// 
//     private final byte[] publicKey;
//     private final byte[] secretKey;
// 
//     public KeyPair() {
//         this.secretKey = zeros(CRYPTO_BOX_CURVE25519XSALSA20POLY1305_SECRETKEYBYTES);
//         this.publicKey = zeros(CRYPTO_BOX_CURVE25519XSALSA20POLY1305_PUBLICKEYBYTES);
//         sodium().crypto_box_curve25519xsalsa20poly1305_keypair(publicKey, secretKey);
//     }
// 
//     public KeyPair(byte[] secretKey) {
//         this.secretKey = secretKey;
//         checkLength(this.secretKey, CRYPTO_BOX_CURVE25519XSALSA20POLY1305_SECRETKEYBYTES);
//         Point point = new Point();
//         this.publicKey = point.mult(secretKey).toBytes();
//     }
// 
//     public KeyPair(String secretKey, Encoder encoder) {
//         this(encoder.decode(secretKey));
//     }
// 
//     public PublicKey getPublicKey() {
//         return new PublicKey(publicKey);
//     }
// 
//     public PrivateKey getPrivateKey() {
//         return new PrivateKey(secretKey);
//     }
// }


import static org.abstractj.kalium.NaCl.Sodium.CRYPTO_BOX_CURVE25519XSALSA20POLY1305_PUBLICKEYBYTES;
import static org.abstractj.kalium.NaCl.Sodium.CRYPTO_BOX_CURVE25519XSALSA20POLY1305_SECRETKEYBYTES;
import static org.abstractj.kalium.NaCl.sodium;
import static org.junit.Assert.assertArrayEquals;
import java.security.SecureRandom;
import org.abstractj.kalium.keys.KeyPair;
import org.junit.Test;
package org.abstractj.kalium.crypto;



public class SealedBoxTest {

    @Test
    public void testEncryptDecrypt() throws Exception {
        SecureRandom r = new SecureRandom();
// Path: src/main/java/org/abstractj/kalium/NaCl.java
// public static Sodium sodium() {
//     Sodium sodium = SingletonHolder.SODIUM_INSTANCE;
//     checkVersion(sodium);
//     return sodium;
// }
// 
// Path: src/main/java/org/abstractj/kalium/keys/KeyPair.java
// public class KeyPair {
// 
//     private final byte[] publicKey;
//     private final byte[] secretKey;
// 
//     public KeyPair() {
//         this.secretKey = zeros(CRYPTO_BOX_CURVE25519XSALSA20POLY1305_SECRETKEYBYTES);
//         this.publicKey = zeros(CRYPTO_BOX_CURVE25519XSALSA20POLY1305_PUBLICKEYBYTES);
//         sodium().crypto_box_curve25519xsalsa20poly1305_keypair(publicKey, secretKey);
//     }
// 
//     public KeyPair(byte[] secretKey) {
//         this.secretKey = secretKey;
//         checkLength(this.secretKey, CRYPTO_BOX_CURVE25519XSALSA20POLY1305_SECRETKEYBYTES);
//         Point point = new Point();
//         this.publicKey = point.mult(secretKey).toBytes();
//     }
// 
//     public KeyPair(String secretKey, Encoder encoder) {
//         this(encoder.decode(secretKey));
//     }
// 
//     public PublicKey getPublicKey() {
//         return new PublicKey(publicKey);
//     }
// 
//     public PrivateKey getPrivateKey() {
//         return new PrivateKey(secretKey);
//     }
// }


// Path: src/test/java/org/abstractj/kalium/crypto/SealedBoxTest.java
import static org.abstractj.kalium.NaCl.Sodium.CRYPTO_BOX_CURVE25519XSALSA20POLY1305_PUBLICKEYBYTES;
import static org.abstractj.kalium.NaCl.Sodium.CRYPTO_BOX_CURVE25519XSALSA20POLY1305_SECRETKEYBYTES;
import static org.abstractj.kalium.NaCl.sodium;
import static org.junit.Assert.assertArrayEquals;
import java.security.SecureRandom;
import org.abstractj.kalium.keys.KeyPair;
import org.junit.Test;

package org.abstractj.kalium.crypto;



public class SealedBoxTest {

    @Test
    public void testEncryptDecrypt() throws Exception {
        SecureRandom r = new SecureRandom();
        KeyPair keyPair = new KeyPair(new byte[CRYPTO_BOX_CURVE25519XSALSA20POLY1305_SECRETKEYBYTES]);