@Test(expected = IllegalArgumentException.class) public void failure_GeneratePrivateKey() { PrivateKey.newInstance(new byte[56]); PrivateKey.newInstance(new byte[31]); }
public static PrivateKey newInstance(byte[] seed) { switch (seed.length) { case 32: return PrivateKeyEd25519.fromBytes(seed); case 57: return PrivateKeyEd448.fromBytes(seed); default: throw new IllegalArgumentException("PrivateKey byte length " + seed.length + " is not supported."); } }
PrivateKey { public static PrivateKey newInstance(byte[] seed) { switch (seed.length) { case 32: return PrivateKeyEd25519.fromBytes(seed); case 57: return PrivateKeyEd448.fromBytes(seed); default: throw new IllegalArgumentException("PrivateKey byte length " + seed.length + " is not supported."); } } }
PrivateKey { public static PrivateKey newInstance(byte[] seed) { switch (seed.length) { case 32: return PrivateKeyEd25519.fromBytes(seed); case 57: return PrivateKeyEd448.fromBytes(seed); default: throw new IllegalArgumentException("PrivateKey byte length " + seed.length + " is not supported."); } } protected  PrivateKey(byte[] value); }
PrivateKey { public static PrivateKey newInstance(byte[] seed) { switch (seed.length) { case 32: return PrivateKeyEd25519.fromBytes(seed); case 57: return PrivateKeyEd448.fromBytes(seed); default: throw new IllegalArgumentException("PrivateKey byte length " + seed.length + " is not supported."); } } protected  PrivateKey(byte[] value); static PrivateKey newInstance(byte[] seed); static PrivateKey newInstance(String hexString); abstract BigInteger getScalarSeed(HashDelegate hashDelegate); byte[] getRaw(); BigInteger getInteger(); String getHexString(); @Override int hashCode(); @Override boolean equals(final Object obj); }
PrivateKey { public static PrivateKey newInstance(byte[] seed) { switch (seed.length) { case 32: return PrivateKeyEd25519.fromBytes(seed); case 57: return PrivateKeyEd448.fromBytes(seed); default: throw new IllegalArgumentException("PrivateKey byte length " + seed.length + " is not supported."); } } protected  PrivateKey(byte[] value); static PrivateKey newInstance(byte[] seed); static PrivateKey newInstance(String hexString); abstract BigInteger getScalarSeed(HashDelegate hashDelegate); byte[] getRaw(); BigInteger getInteger(); String getHexString(); @Override int hashCode(); @Override boolean equals(final Object obj);  }