Package com.googlecode.gwt.crypto.bouncycastle.generators

Examples of com.googlecode.gwt.crypto.bouncycastle.generators.RSAKeyPairGenerator


     * Note, we'd like to migrate to this, but it takes too long given https://code.google.com/p/google-web-toolkit/issues/detail?id=8310
     * @param strength
     * @return
     */
    public static AsymmetricCipherKeyPair makeKeypairSlow(Strength strength) {
        RSAKeyPairGenerator generator = new RSAKeyPairGenerator();

        // see https://code.google.com/p/gwt-crypto/issues/detail?id=25
        SecureRandom random = SecureRandom.getInstance(null);
        BigInteger exponent = BigInteger.valueOf(65537);
        RSAKeyGenerationParameters params = new RSAKeyGenerationParameters(
                exponent,
                random,
                strength.strength,
                80);
        generator.init(params);
        // see https://code.google.com/p/gwt-crypto/issues/detail?id=26
        return generator.generateKeyPair();
    }
View Full Code Here

TOP

Related Classes of com.googlecode.gwt.crypto.bouncycastle.generators.RSAKeyPairGenerator

Copyright © 2018 www.massapicom. 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.