Code example for SecureRandom

Methods: nextBytes

0
            param = pr.getParameters();
            sr = pr.getRandom();
        } 
        else 
        { 
            sr = new SecureRandom();
        } 
 
        if (param instanceof KeyParameter)
        { 
            this.param = (KeyParameter)param;
 
            if (this.forWrapping)
            { 
 
                // Hm, we have no IV but we want to wrap ?!? 
                // well, then we have to create our own IV. 
                this.iv = new byte[8];
                sr.nextBytes(iv);
 
                this.paramPlusIV = new ParametersWithIV(this.param, this.iv);
            } 
        } 
        else if (param instanceof ParametersWithIV)