public SecretBox(byte[] seed) { checkLength(seed, SEED_LENGTH); this.seed = seed; this.secretKey = CryptoUtils.zeros(SECRETKEY_BYTES * 2); byte[] publicKey = CryptoUtils.zeros(PUBLICKEY_BYTES); isValid( sodium().crypto_sign_ed25519_seed_keypair(publicKey, secretKey, seed), "Failed to generate a key pair"); this.pubKey = Base58.encode(publicKey); }