Examples of RSAKeyGenerationParameters


Examples of org.bouncycastle.crypto.params.RSAKeyGenerationParameters

        public RSA()
        {
            super("RSA");

            engine = new RSAKeyPairGenerator();
            param = new RSAKeyGenerationParameters(defaultPublicExponent,
                            new SecureRandom(), 2048, defaultTests);
            engine.init(param);
        }
View Full Code Here

Examples of org.bouncycastle.crypto.params.RSAKeyGenerationParameters

        public void initialize(
            int             strength,
            SecureRandom    random)
        {
            param = new RSAKeyGenerationParameters(defaultPublicExponent,
                            random, strength, defaultTests);

            engine.init(param);
        }
View Full Code Here

Examples of org.bouncycastle.crypto.params.RSAKeyGenerationParameters

            {
                throw new InvalidAlgorithmParameterException("parameter object not a RSAKeyGenParameterSpec");
            }
            RSAKeyGenParameterSpec     rsaParams = (RSAKeyGenParameterSpec)params;

            param = new RSAKeyGenerationParameters(
                            rsaParams.getPublicExponent(),
                            random, rsaParams.getKeysize(), defaultTests);

            engine.init(param);
        }
View Full Code Here

Examples of org.bouncycastle.crypto.params.RSAKeyGenerationParameters

    Security.addProvider(new BouncyCastleProvider());

    // generate RSA keys
    RSAKeyPairGenerator gen = new RSAKeyPairGenerator();
    gen.init(new RSAKeyGenerationParameters(new BigInteger("10001", 16), new SecureRandom(), 2048, 80));
    AsymmetricCipherKeyPair keyPair = gen.generateKeyPair();

    // some data where first entry is 0
    byte[] data = { 10, 122, 12, 127, 35, 58, 87, 56, -6, 73, 10, -13, -78, 4, -122, -61 };
View Full Code Here

Examples of org.bouncycastle.crypto.params.RSAKeyGenerationParameters

        public RSA()
        {
            super("RSA");

            engine = new RSAKeyPairGenerator();
            param = new RSAKeyGenerationParameters(defaultPublicExponent,
                            new SecureRandom(), 2048, defaultTests);
            engine.init(param);
        }
View Full Code Here

Examples of org.bouncycastle.crypto.params.RSAKeyGenerationParameters

        public void initialize(
            int             strength,
            SecureRandom    random)
        {
            param = new RSAKeyGenerationParameters(defaultPublicExponent,
                            random, strength, defaultTests);

            engine.init(param);
        }
View Full Code Here

Examples of org.bouncycastle.crypto.params.RSAKeyGenerationParameters

            {
                throw new InvalidAlgorithmParameterException("parameter object not a RSAKeyGenParameterSpec");
            }
            RSAKeyGenParameterSpec     rsaParams = (RSAKeyGenParameterSpec)params;

            param = new RSAKeyGenerationParameters(
                            rsaParams.getPublicExponent(),
                            random, rsaParams.getKeysize(), defaultTests);

            engine.init(param);
        }
View Full Code Here

Examples of org.bouncycastle.crypto.params.RSAKeyGenerationParameters

  public AsymmetricCipherKeyPair keyPairGeneration(int strength)throws Exception
  {
    SecureRandom securerandom = new SecureRandom();
    BigInteger pubExp = new BigInteger("10001", 16);

    RSAKeyGenerationParameters RSAKeyGenParams = new RSAKeyGenerationParameters
                        (pubExp,securerandom, strength, 80);
    RSAKeyPairGenerator rsakeygen = new RSAKeyPairGenerator();
    rsakeygen.init(RSAKeyGenParams);
    AsymmetricCipherKeyPair keypair = rsakeygen.generateKeyPair();
View Full Code Here

Examples of org.bouncycastle.crypto.params.RSAKeyGenerationParameters

        public RSA()
        {
            super("RSA");

            engine = new RSAKeyPairGenerator();
            param = new RSAKeyGenerationParameters(defaultPublicExponent,
                            new SecureRandom(), 2048, defaultTests);
            engine.init(param);
        }
View Full Code Here

Examples of org.bouncycastle.crypto.params.RSAKeyGenerationParameters

        public void initialize(
            int             strength,
            SecureRandom    random)
        {
            param = new RSAKeyGenerationParameters(defaultPublicExponent,
                            random, strength, defaultTests);

            engine.init(param);
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.