public static String hash(String p){
  String str=null;
  try {
    byte[] bb=p.getBytes();
    str=SaltedSHA512PasswordStorageScheme.encodeOffline(bb);
  }
 catch (  Exception ex) {
    Debug debug=Debug.getInstance(SetupConstants.DEBUG_NAME);
    debug.error("EmbeddedOpenDS.hash failed : ex=" + ex);
  }
  return str;
}

public static String hash ( String p ) { String str = null ; try { byte [ ] bb = p . getBytes ( ) ; str = SaltedSHA512PasswordStorageScheme . encodeOffline ( bb ) ; } catch ( Exception ex ) { Debug debug = Debug . getInstance ( SetupConstants . DEBUG_NAME ) ; debug . error ( "EmbeddedOpenDS.hash failed : ex=" + ex ) ; } return str ; }
returns a one - way hash for passwd using ssha512 scheme .
