use of tests.security.KeyAgreementHelper in project robovm by robovm.
the class OldKeyPairGeneratorTestDH method testKeyPairGenerator.
@BrokenTest("Takes ages due to DH computations. Disabling for now.")
public void testKeyPairGenerator() throws NoSuchAlgorithmException {
KeyPairGenerator generator = KeyPairGenerator.getInstance("DH");
generator.initialize(1024);
KeyPair keyPair = generator.generateKeyPair();
assertNotNull("no keypair generated", keyPair);
assertNotNull("no public key generated", keyPair.getPublic());
assertNotNull("no private key generated", keyPair.getPrivate());
new KeyAgreementHelper("DH").test(keyPair);
}
Aggregations