public static byte [ ] computeHash ( String passwd ) throws NoSuchAlgorithmException { java . security . MessageDigest md = java . security . MessageDigest . getInstance ( "SHA-1" ) ; md . reset ( ) ; md . update ( passwd . getBytes ( ) ) ; return md . digest ( ) ; }
Compute the the hash value for the String .