Search in sources :

Example 1 with KeyAgreementHelper

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);
}
Also used : KeyPair(java.security.KeyPair) KeyPairGenerator(java.security.KeyPairGenerator) KeyAgreementHelper(tests.security.KeyAgreementHelper) BrokenTest(dalvik.annotation.BrokenTest)

Aggregations

BrokenTest (dalvik.annotation.BrokenTest)1 KeyPair (java.security.KeyPair)1 KeyPairGenerator (java.security.KeyPairGenerator)1 KeyAgreementHelper (tests.security.KeyAgreementHelper)1