| java.lang.Object org.apache.james.security.DigestUtil
DigestUtil | public class DigestUtil (Code) | | Computes and verifies digests of files and strings
version: $Revision: 494012 $ |
Method Summary | |
public static void | digestFile(String filename, String algorithm) Calculate digest of given file with given algorithm. | public static String | digestString(String pass, String algorithm) Calculate digest of given String using given algorithm. | public static void | main(String[] args) Command line interface. | public static void | printUsage() Print the command line usage string. |
digestFile | public static void digestFile(String filename, String algorithm)(Code) | | Calculate digest of given file with given algorithm.
Writes digest to file named filename.algorithm .
Parameters: filename - the String name of the file to be hashed Parameters: algorithm - the algorithm to be used to compute the digest |
digestString | public static String digestString(String pass, String algorithm) throws NoSuchAlgorithmException(Code) | | Calculate digest of given String using given algorithm.
Encode digest in MIME-like base64.
Parameters: pass - the String to be hashed Parameters: algorithm - the algorithm to be used String Base-64 encoding of digest throws: NoSuchAlgorithmException - if the algorithm passed in cannot be found |
main | public static void main(String[] args)(Code) | | Command line interface. Use -help for arguments.
Parameters: args - the arguments passed in on the command line |
printUsage | public static void printUsage()(Code) | | Print the command line usage string.
|
|
|