class Kalium implements Encryptor {

    @Override
    public KeyPair generateNewKeys() {
        final byte[] publicKey = new byte[CRYPTO_BOX_CURVE25519XSALSA20POLY1305_PUBLICKEYBYTES];
        final byte[] privateKey = new byte[CRYPTO_BOX_CURVE25519XSALSA20POLY1305_SECRETKEYBYTES];

        LOGGER.info("Generating new keypair...");

        final int sodiumResult = this.sodium.crypto_box_curve25519xsalsa20poly1305_keypair(publicKey, privateKey);

        if (sodiumResult == -1) {
            LOGGER.error("Unable to generate a new keypair!");
            throw new EncryptorException("Kalium could not generate a new public/private keypair");
        }

        final PublicKey pubKey = PublicKey.from(publicKey);
        final PrivateKey privKey = PrivateKey.from(privateKey);

        LOGGER.info("Generated new keypair with public key {}", pubKey);
        LOGGER.debug("Generated public key {} and private key {}", pubKey, privKey);

        return new KeyPair(pubKey, privKey);
    }

    public  Kalium(final NaCl.Sodium sodium);

}