com.hs.mail.security.login
Class MD5PasswordEncoder
java.lang.Object
com.hs.mail.security.login.MD5PasswordEncoder
- All Implemented Interfaces:
- PasswordEncoder
public class MD5PasswordEncoder
- extends Object
- implements PasswordEncoder
Implementation of the password encoder that returns the MD5 hash of any
plaintext password passed into the encoder. The specification is available
from RFC 1321.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MD5PasswordEncoder
public MD5PasswordEncoder()
encodePassword
public static String encodePassword(char[] password)
encode
public String encode(char[] password)
- Specified by:
encode
in interface PasswordEncoder
compare
public boolean compare(String encoded,
char[] plain)
- Specified by:
compare
in interface PasswordEncoder
crypt
public static String crypt(String salt,
char[] password)
main
public static void main(String[] args)
Copyright © 2011. All Rights Reserved.