Search in sources :

Example 1 with RSAKeyGenerationParameters

use of org.bouncycastle.crypto.params.RSAKeyGenerationParameters in project robovm by robovm.

the class KeyPairGeneratorSpi method initialize.

public void initialize(AlgorithmParameterSpec params, SecureRandom random) throws InvalidAlgorithmParameterException {
    if (!(params instanceof RSAKeyGenParameterSpec)) {
        throw new InvalidAlgorithmParameterException("parameter object not a RSAKeyGenParameterSpec");
    }
    RSAKeyGenParameterSpec rsaParams = (RSAKeyGenParameterSpec) params;
    param = new RSAKeyGenerationParameters(rsaParams.getPublicExponent(), random, rsaParams.getKeysize(), defaultTests);
    engine.init(param);
}
Also used : InvalidAlgorithmParameterException(java.security.InvalidAlgorithmParameterException) RSAKeyGenParameterSpec(java.security.spec.RSAKeyGenParameterSpec) RSAKeyGenerationParameters(org.bouncycastle.crypto.params.RSAKeyGenerationParameters)

Example 2 with RSAKeyGenerationParameters

use of org.bouncycastle.crypto.params.RSAKeyGenerationParameters in project robovm by robovm.

the class KeyPairGeneratorSpi method initialize.

public void initialize(int strength, SecureRandom random) {
    param = new RSAKeyGenerationParameters(defaultPublicExponent, random, strength, defaultTests);
    engine.init(param);
}
Also used : RSAKeyGenerationParameters(org.bouncycastle.crypto.params.RSAKeyGenerationParameters)

Aggregations

RSAKeyGenerationParameters (org.bouncycastle.crypto.params.RSAKeyGenerationParameters)2 InvalidAlgorithmParameterException (java.security.InvalidAlgorithmParameterException)1 RSAKeyGenParameterSpec (java.security.spec.RSAKeyGenParameterSpec)1