@ Deprecated public static String hash ( String plaintext ) throws WrappedException { try { MessageDigest md = MessageDigest . getInstance ( "SHA-1" ) ; md . update ( plaintext . getBytes ( "UTF-8" ) ) ; return hexEncode ( md . digest ( ) ) ; } catch ( NoSuchAlgorithmException | UnsupportedEncodingException e ) { throw new WrappedException ( e ) ; } }
Performs a one - way hash of the plaintext value using SHA - 1 .