/** * Test method for {@link * net.i2p.crypto.eddsa.spec.EdDSAPrivateKeySpec#EdDSAPrivateKeySpec(net.i2p.crypto.eddsa.spec.EdDSAParameterSpec, * byte[])}. */ @Test public void testEdDSAPrivateKeySpecFromH() { EdDSAPrivateKeySpec key = new EdDSAPrivateKeySpec(ed25519, ZERO_H); assertThat(key.getSeed(), is(nullValue())); assertThat(key.getH(), is(equalTo(ZERO_H))); assertThat(key.getA().toByteArray(), is(equalTo(ZERO_PK))); }
/** * Test method for {@link * net.i2p.crypto.eddsa.spec.EdDSAPrivateKeySpec#EdDSAPrivateKeySpec(byte[], * net.i2p.crypto.eddsa.spec.EdDSAParameterSpec)}. */ @Test public void testEdDSAPrivateKeySpecFromSeed() { EdDSAPrivateKeySpec key = new EdDSAPrivateKeySpec(ZERO_SEED, ed25519); assertThat(key.getSeed(), is(equalTo(ZERO_SEED))); assertThat(key.getH(), is(equalTo(ZERO_H))); assertThat(key.getA().toByteArray(), is(equalTo(ZERO_PK))); }