Package com.sun.identity.shared.encode
Class Hash
- java.lang.Object
-
- com.sun.identity.shared.encode.Hash
-
public class Hash extends Object
The classHashprovides generic methods to hash data.
-
-
Constructor Summary
Constructors Constructor Description Hash()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Stringhash(String string)Generates a SHA1 digest of the string and returns BASE64 encoded digest.static voidmain(String[] args)Hash of the provided string or string read from a file specified with a "-f" option
-
-
-
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
-
-