org.apache.ftpserver.usermanager
Interface PasswordEncryptor

All Known Implementing Classes:
ClearTextPasswordEncryptor, Md5PasswordEncryptor, SaltedPasswordEncryptor

public interface PasswordEncryptor

Strategy used for encrypting and matching encrypted passwords. The purpose is to make the password encryption possible to extend.

Author:
Apache MINA Project

Method Summary
 String encrypt(String password)
          Encrypts the password
 boolean matches(String passwordToCheck, String storedPassword)
          Matches an encrypted password with that stored
 

Method Detail

encrypt

String encrypt(String password)
Encrypts the password

Parameters:
password - The clear text password
Returns:
The encrypted password

matches

boolean matches(String passwordToCheck,
                String storedPassword)
Matches an encrypted password with that stored

Parameters:
passwordToCheck - The encrypted password to check
storedPassword - The stored password
Returns:
true if the password match


Copyright © 2003-2011 Apache Software Foundation. All Rights Reserved.