SK.gnome.dwarf.auth.login
Interface PasswordEncoder

All Known Implementing Classes:
CleartextPasswordEncoder, CryptPasswordEncoder, MD5CryptPasswordEncoder, MD5PasswordEncoder

public interface PasswordEncoder

Provides encoding and comparing of user passwords.


Method Summary
 boolean compare(java.lang.String encoded, char[] plain)
          Compares two passwords.
 java.lang.String encode(char[] password)
          Encodes a single password.
 

Method Detail

encode

public java.lang.String encode(char[] password)
Encodes a single password.

Note that two subsequent calls to this method with the same argument may result in two different strings returned. Use the compare method therefore for comparing the encoded password with its plain format.

Parameters:
password - the password
Returns:
the encoded password

compare

public boolean compare(java.lang.String encoded,
                       char[] plain)
Compares two passwords.

Parameters:
encoded - the encoded password
plain - the plain (non-encoded) password
Returns:
true if the passwords are equal


Copyright (c) 1999-2005, Gnome Ltd. All rights reserved.