org.apache.ftpserver.usermanager
Class Md5PasswordEncryptor
java.lang.Object
org.apache.ftpserver.usermanager.Md5PasswordEncryptor
- All Implemented Interfaces:
- PasswordEncryptor
public class Md5PasswordEncryptor
- extends Object
- implements PasswordEncryptor
Password encryptor that hashes the password using MD5. Please note that this form
of encryption is sensitive to lookup attacks.
- Author:
- Apache MINA Project
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Md5PasswordEncryptor
public Md5PasswordEncryptor()
encrypt
public String encrypt(String password)
- Hashes the password using MD5
- Specified by:
encrypt
in interface PasswordEncryptor
- Parameters:
password
- The clear text password
- Returns:
- The encrypted password
matches
public boolean matches(String passwordToCheck,
String storedPassword)
- Matches an encrypted password with that stored
- Specified by:
matches
in interface PasswordEncryptor
- Parameters:
passwordToCheck
- The encrypted password to checkstoredPassword
- The stored password
- Returns:
- true if the password match
Copyright © 2003-2011 Apache Software Foundation. All Rights Reserved.