com.hs.mail.security.login
Class MD5PasswordEncoder

java.lang.Object
  extended by 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.


Constructor Summary
MD5PasswordEncoder()
           
 
Method Summary
 boolean compare(String encoded, char[] plain)
           
static String crypt(String salt, char[] password)
           
 String encode(char[] password)
           
static String encodePassword(char[] password)
           
static void main(String[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MD5PasswordEncoder

public MD5PasswordEncoder()
Method Detail

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.