Package org.jboss.aerogear.crypto

Examples of org.jboss.aerogear.crypto.Random


        return encrypt(password, salt, ITERATIONS);
    }

    @Override
    public byte[] encrypt(String password) throws InvalidKeySpecException {
        byte[] salt = new Random().randomBytes();
        return encrypt(password, salt);
    }
View Full Code Here


        return encrypt(password, salt);
    }

    @Override
    public SecretKey generateSecretKey(String password) throws InvalidKeySpecException {
        byte[] salt = new Random().randomBytes();
        return generateSecretKey(password, salt, ITERATIONS);
    }
View Full Code Here

        return encrypt(password, salt, ITERATIONS);
    }

    @Override
    public byte[] encrypt(String password) throws InvalidKeySpecException {
        byte[] salt = new Random().randomBytes();
        return encrypt(password, salt);
    }
View Full Code Here

    }

    public static byte[] generateAndStorePrivateKey(final DataStore store, final SimplePushServerConfig config) {
        byte[] keySalt = store.getPrivateKeySalt();
        if (keySalt.length == 0) {
            keySalt = new Random().randomBytes();
            store.savePrivateKeySalt(keySalt);
        }
        return CryptoUtil.secretKey(config.password(), keySalt);
    }
View Full Code Here

TOP

Related Classes of org.jboss.aerogear.crypto.Random

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.