Ed25519SchemeProvider extends SchemeProvider { @Override public PrivateKey generatePrivateKey() { SecureRandom random = new SecureRandom(); byte[] seed = new byte[32]; random.nextBytes(seed); return PrivateKey.newInstance(seed); } Ed25519SchemeProvider(HashAlgorithm algorithm); @Override EdDsaSigner getSigner(); @Override PublicKeyDelegate getPublicKeyDelegate(); @Override PrivateKey generatePrivateKey(); @Override byte[] preHash(byte[] input); @Override byte[] dom(byte[] context);  }
@Test public void success_GeneratePrivateKey() { SchemeProvider provider = new Ed25519SchemeProvider(HashAlgorithm.KECCAK_512); PrivateKey privateKey = provider.generatePrivateKey(); assertNotNull(privateKey); assertThat((privateKey instanceof PrivateKeyEd25519), is(true)); }