### Question:
Crypto { public static byte[] getKeySeed(String secretPhrase, byte[]... nonces) { return getKeySeed(Convert.toBytes(secretPhrase), nonces); } private  Crypto(); static SecureRandom getSecureRandom(); static MessageDigest getMessageDigest(String algorithm); static MessageDigest sha256(); static MessageDigest sha512(); static MessageDigest ripemd160(); static MessageDigest sha3(); static byte[] getKeySeed(String secretPhrase, byte[]... nonces); static byte[] getKeySeed(byte[] secretBytes, byte[]... nonces); static byte[] getPublicKey(byte[] keySeed); static byte[] getPublicKey(String secretPhrase); static byte[] getPrivateKey(byte[] keySeed); static byte[] getPrivateKey(String secretPhrase); static void curve(byte[] Z, byte[] k, byte[] P); static byte[] sign(byte[] message, String secretPhrase); static byte[] sign(byte[] message, byte[] keySeed); static boolean verify(byte[] signature, byte[] message, byte[] publicKey); static byte[] getSharedKey(byte[] myPrivateKey, byte[] theirPublicKey); static byte[] getSharedKey(byte[] myPrivateKey, byte[] theirPublicKey, byte[] nonce); static byte[] aesEncrypt(byte[] plaintext, byte[] key); static byte[] aesGCMEncrypt(byte[] plaintext, byte[] key); static byte[] aesDecrypt(byte[] ivCiphertext, byte[] key); static byte[] aesGCMDecrypt(byte[] ivCiphertext, byte[] key); static String rsEncode(long id); static long rsDecode(String rsString); static boolean isCanonicalPublicKey(byte[] publicKey); static boolean isCanonicalSignature(byte[] signature); static FBElGamalKeyPair getElGamalKeyPair(); static String elGamalDecrypt(String cryptogramm, FBElGamalKeyPair keyPair); static String elGamalEncrypt(String plainText, FBElGamalKeyPair keyPair);  }### Answer:
@Test public void testGetKeySeed_String_byteArrArr() throws IOException { byte[] result = Crypto.getKeySeed(secretPhraseA, nonce1, nonce2); byte[] expResult = Convert.parseHexString("b1702f2262274290d1428b04f2e55e5af3af413575c7659ac02ee5633c504c6f"); assertArrayEquals(expResult, result); writeToFile(ByteBuffer.wrap(result), TST_OUT_DIR+OUT_FILE_KEYSEED_S2N); }
@Test public void testGetKeySeed_byteArr_byteArrArr() throws IOException { byte[] result = Crypto.getKeySeed(secretPhraseA.getBytes(), nonce1, nonce2); byte[] expResult = Convert.parseHexString("b1702f2262274290d1428b04f2e55e5af3af413575c7659ac02ee5633c504c6f"); assertArrayEquals(expResult, result); writeToFile(ByteBuffer.wrap(result), TST_OUT_DIR+OUT_FILE_KEYSEED_B2N); }
@Test public void testGetPublicKey_byteArr() throws IOException { byte[] result = Crypto.getKeySeed(secretPhraseA.getBytes()); byte[] expResult = Convert.parseHexString("b0f12497c84af1ac2603f97d1fb804fc308e241d522fa5d21e900facbb92d6ee"); assertArrayEquals(expResult, result); writeToFile(ByteBuffer.wrap(result), TST_OUT_DIR+OUT_FILE_PRIVKEY_B); }