try { this.random = SecureRandom.getInstance("SHA1PRNG"); } catch (NoSuchAlgorithmException e) { throw new TlsRuntimeException("cannot create random", e); }
this.random = new SecureRandom();
    public TlsProtocolHandler(InputStream is, OutputStream os)    {        /*         * 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();        try        {            this.random = SecureRandom.getInstance("SHA1PRNG");        }        catch (NoSuchAlgorithmException e)        {            throw new TlsRuntimeException("cannot create random", e);        }        /*         * Hopefully, 20 bytes in fast mode are good enough.         */        this.random.setSeed(tsg.generateSeed(20, true));        this.rs = new RecordStream(this, is, os);    }