Package java.security

Examples of java.security.SecureRandom


      sslContext = SSLContext.getInstance("SSLv3");
      if (trustManager == null) {
        trustManager = new TrustManager[]{DummyTrustManager.getInstance()};
      }

      sslContext.init(new KeyManager[0], trustManager, new SecureRandom());
    }

    if (getSslSocketFactory() == null) {
      sslSocketFactory = sslContext.getSocketFactory();
    }
View Full Code Here


        km = kmf.getKeyManagers();
      } else {
        km = new KeyManager[0];
      }

      context.init(km, getTrustManager(), new SecureRandom());
      setSslContext(context);
    }
   
    if(getSslSocketFactory()==null) {
      SSLSocketFactory factory = getSslContext().getSocketFactory();
View Full Code Here

            this.random = rParam.getRandom();
            kParam = (AsymmetricKeyParameter)rParam.getParameters();
        }
        else
        {  
            this.random = new SecureRandom();
            kParam = (AsymmetricKeyParameter)param;
        }

        engine.init(forEncryption, kParam);
View Full Code Here

                this.random = rParam.getRandom();
                this.key = (ECPrivateKeyParameters)rParam.getParameters();
            }
            else
            {
                this.random = new SecureRandom();
                this.key = (ECPrivateKeyParameters)param;
            }
        }
        else
        {
View Full Code Here

      {
        pGen.init(strength, 20, random);
      }
      else
      {
        pGen.init(strength, 20, new SecureRandom());
      }

            DHParameters                p = pGen.generateParameters();

            AlgorithmParameters params;
View Full Code Here

      {
        pGen.init(strength, 20, random);
      }
      else
      {
        pGen.init(strength, 20, new SecureRandom());
      }

            DSAParameters p = pGen.generateParameters();

            AlgorithmParameters params;
View Full Code Here

      {
        pGen.init(strength, 20, random);
      }
      else
      {
        pGen.init(strength, 20, new SecureRandom());
      }

            ElGamalParameters p = pGen.generateParameters();

            AlgorithmParameters params;
View Full Code Here

        {
            byte[]  iv = new byte[8];

      if (random == null)
      {
                random = new SecureRandom();
      }

            random.nextBytes(iv);

            AlgorithmParameters params;
View Full Code Here

            {
                byte[]  iv = new byte[8];

                if (random == null)
                {
                    random = new SecureRandom();
                }

                random.nextBytes(iv);

                try
View Full Code Here

        {
            byte[]  iv = new byte[16];

      if (random == null)
      {
                random = new SecureRandom();
      }

            random.nextBytes(iv);

            AlgorithmParameters params;
View Full Code Here

TOP

Related Classes of java.security.SecureRandom

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.