Java 类org.bouncycastle.crypto.prng.ThreadedSeedGenerator 实例源码

项目:ipack    文件:TlsClientProtocol.java   
private static SecureRandom createSecureRandom()
{
    /*
     * We use our threaded seed generator to generate a good random seed. If the user has a
     * better random seed, he should use the constructor with a SecureRandom.
     */
    ThreadedSeedGenerator tsg = new ThreadedSeedGenerator();
    SecureRandom random = new SecureRandom();

    /*
     * Hopefully, 20 bytes in fast mode are good enough.
     */
    random.setSeed(tsg.generateSeed(20, true));

    return random;
}
项目:CryptMeme    文件:TlsClientProtocol.java   
private static SecureRandom createSecureRandom()
{
    /*
     * We use our threaded seed generator to generate a good random seed. If the user has a
     * better random seed, he should use the constructor with a SecureRandom.
     */
    ThreadedSeedGenerator tsg = new ThreadedSeedGenerator();
    SecureRandom random = new SecureRandom();

    /*
     * Hopefully, 20 bytes in fast mode are good enough.
     */
    random.setSeed(tsg.generateSeed(20, true));

    return random;
}
项目:irma_future_id    文件:TlsClientProtocol.java   
private static SecureRandom createSecureRandom()
{
    /*
     * We use our threaded seed generator to generate a good random seed. If the user has a
     * better random seed, he should use the constructor with a SecureRandom.
     */
    ThreadedSeedGenerator tsg = new ThreadedSeedGenerator();
    SecureRandom random = new SecureRandom();

    /*
     * Hopefully, 20 bytes in fast mode are good enough.
     */
    random.setSeed(tsg.generateSeed(20, true));

    return random;
}
项目:bc-java    文件:TlsClientProtocol.java   
private static SecureRandom createSecureRandom()
{
    /*
     * We use our threaded seed generator to generate a good random seed. If the user has a
     * better random seed, he should use the constructor with a SecureRandom.
     */
    ThreadedSeedGenerator tsg = new ThreadedSeedGenerator();
    SecureRandom random = new SecureRandom();

    /*
     * Hopefully, 20 bytes in fast mode are good enough.
     */
    random.setSeed(tsg.generateSeed(20, true));

    return random;
}
项目:jradius    文件:TlsProtocolHandler.java   
private static SecureRandom createSecureRandom()
{
    /*
     * We use our threaded seed generator to generate a good random seed. If the user
     * has a better random seed, he should use the constructor with a SecureRandom.
     */
    ThreadedSeedGenerator tsg = new ThreadedSeedGenerator();
    SecureRandom random = new SecureRandom();

    /*
     * Hopefully, 20 bytes in fast mode are good enough.
     */
    random.setSeed(tsg.generateSeed(20, true));

    return random;
}