Package ca.carleton.gcrc.security.rng

Examples of ca.carleton.gcrc.security.rng.RngFactory


    ){
    this.userDb = userDb;
    this.nunaliitUserDesignDocument = nunaliitUserDesignDocument;
    this.userMailNotification = userMailNotification;
   
    rng = (new RngFactory()).createRng();
   
    // Hard coded key
   
  }
View Full Code Here


    AtlasProperties.readProperties(atlasDir, props);
   
    // Create a server key, if one does not exist
    String serverKey = props.getProperty("server.key",null);
    if( null == serverKey ){
      SecureRandom rng = (new RngFactory()).createRng();
      byte[] key = new byte[16];
      rng.nextBytes(key);
     
      serverKey = Base64.encodeBase64String(key);
      props.setProperty("server.key", serverKey);
View Full Code Here

    this.atlasName = atlasName;
    this.couchDb = couchDb;
    this.userRepository = userRepository;
    this.userMailNotification = userMailNotification;
   
    rng = (new RngFactory()).createRng();
   
    // Hard coded key
   
  }
View Full Code Here

    String version = this.getClient().getVersion().getFullVersion();
   
    if( version.compareTo("1.3") < 0 ){
      // Prior to 1.3.0. Use salt and password_sha
     
      SecureRandom rng = (new RngFactory()).createRng();
      byte[] salt = new byte[16];
      rng.nextBytes(salt);
     
      String saltString = null;
      {
View Full Code Here

    AtlasProperties.readProperties(atlasDir, props);
   
    // Create a server key, if one does not exist
    String serverKey = props.getProperty("server.key",null);
    if( null == serverKey ){
      SecureRandom rng = (new RngFactory()).createRng();
      byte[] key = new byte[16];
      rng.nextBytes(key);
     
      serverKey = Base64.encodeBase64String(key);
      props.setProperty("server.key", serverKey);
View Full Code Here

    this.atlasName = atlasName;
    this.couchDb = couchDb;
    this.userRepository = userRepository;
    this.userMailNotification = userMailNotification;
   
    rng = (new RngFactory()).createRng();
   
    // Hard coded key
   
  }
View Full Code Here

    "abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ123456789!@#$%?&*";
 
  static public String generatePassword(int size){
    StringWriter sw = new StringWriter();
   
    SecureRandom rng = (new RngFactory()).createRng();
    for(int i=0; i<size; ++i){
      int index = rng.nextInt(CHAR_SET.length());
      char c = CHAR_SET.charAt(index);
      sw.write(c);
    }
View Full Code Here

TOP

Related Classes of ca.carleton.gcrc.security.rng.RngFactory

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.