use of io.nem.symbol.core.crypto.ed25519.Ed25519CryptoEngine in project nem2-sdk-java by nemtech.
the class AccountTest method shouldAcceptKeyPairAsConstructor.
@Test
void shouldAcceptKeyPairAsConstructor() {
KeyPair random = KeyPair.random(new Ed25519CryptoEngine());
Account account = new Account(random, NetworkType.MIJIN_TEST);
assertEquals(random.getPrivateKey().toString().toUpperCase(), account.getPrivateKey());
assertEquals(account.getAddress().getNetworkType(), NetworkType.MIJIN_TEST);
}
use of io.nem.symbol.core.crypto.ed25519.Ed25519CryptoEngine in project nem2-sdk-java by nemtech.
the class AccountTest method shouldAcceptKeyPairAsConstructor.
@Test
void shouldAcceptKeyPairAsConstructor() {
NetworkType networkType = NetworkType.MIJIN_TEST;
KeyPair random = KeyPair.random(new Ed25519CryptoEngine());
Account account = new Account(random, networkType);
assertEquals(random.getPrivateKey().toHex().toUpperCase(), account.getPrivateKey());
assertEquals(networkType, account.getAddress().getNetworkType());
}
Aggregations