code: public static Password createPassword(char[] password) {
  		byte[] salt = JKSecurityUtil.salt();
  		byte[] hash = JKSecurityUtil.hash(password, salt);
  
  		Password pass = new Password();
  		pass.setHash(encodeInToBase64(hash));
  		pass.setSalt(encodeInToBase64(salt));
  		return pass;
  	}
docs: Encrypt password.
  
  @param text the text
  @return the string