Class Hash


  • public class Hash
    extends Object
    The class Hash provides generic methods to hash data.
    • Constructor Detail

      • Hash

        public Hash()
    • Method Detail

      • hash

        public static String hash​(String string)
        Generates a SHA1 digest of the string and returns BASE64 encoded digest.
        Parameters:
        string - a string to be hashed return a BASE64 encoded hashed String or null if an error occurred
      • main

        public static void main​(String[] args)
        Hash of the provided string or string read from a file specified with a "-f" option