com.hs.mail.security.login
Class CryptPasswordEncoder

java.lang.Object
  extended by com.hs.mail.security.login.CryptPasswordEncoder
All Implemented Interfaces:
PasswordEncoder

public class CryptPasswordEncoder
extends Object
implements PasswordEncoder

Unix crypt(3C) utility

Version:
0.9, 11/25/96
Author:
Aki Yoshida

Constructor Summary
CryptPasswordEncoder()
           
 
Method Summary
 boolean compare(String encoded, char[] plain)
           
static String crypt(String key, String setting)
          Encrypts String into crypt (Unix) code.
 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

CryptPasswordEncoder

public CryptPasswordEncoder()
Method Detail

crypt

public static String crypt(String key,
                           String setting)
Encrypts String into crypt (Unix) code.

Parameters:
key - the key to be encrypted
setting - the salt to be used
Returns:
the encrypted String

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

main

public static void main(String[] args)


Copyright © 2011. All Rights Reserved.