| java.lang.Object com.nabhinc.util.EncryptionUtil
EncryptionUtil | public class EncryptionUtil (Code) | | Enrypt a clear text string to hexadecimal format of string using
algorithm supported by java.security.MessageDigest class.
author: Wirawan Chokry author: (c) 2004 Nabh Information Systems, Inc. All Rights Reserved. |
Method Summary | |
final public static String | encrypt(String password, String algorithm) Encrypts a string (password) using the specified algorithm and
returns the result in a hexadecimal form of string. | public static void | main(String[] args) |
encrypt | final public static String encrypt(String password, String algorithm)(Code) | | Encrypts a string (password) using the specified algorithm and
returns the result in a hexadecimal form of string.
The algorithm used has to be one of the digest algorithm supported
by java.security.MessageDigest class (SHA, MD2, or MD5).
If exception occurs, the original string will be returned.
Parameters: password - The string that need to be encrypted. Parameters: algorithm - One of these algorithm: SHA, MD2, or MD5 Enrypted string in hexadecimal format. |
|
|