| |
- __builtin__.object
-
- PasswordEncoder
-
- BasePasswordEncoder
-
- AbstractOneWayPasswordEncoder
-
- Md5PasswordEncoder
- ShaPasswordEncoder
- PlaintextPasswordEncoder
- LdapShaPasswordEncoder
class AbstractOneWayPasswordEncoder(BasePasswordEncoder) |
|
This is an abstract one-way hashing encoder. It is abstract because the
subclasses have to plugin their strategy. |
|
- Method resolution order:
- AbstractOneWayPasswordEncoder
- BasePasswordEncoder
- PasswordEncoder
- __builtin__.object
Methods defined here:
- __init__(self)
- encodePassword(self, rawPass, salt)
- Encodes the specified raw password with an implementation specific algorithm.
- isPasswordValid(self, encPass, rawPass, salt)
- Validates a specified "raw" password against an encoded password.
Methods inherited from BasePasswordEncoder:
- mergePasswordAndSalt(self, password, salt, strict)
- Used by subclasses to generate a merged password and salt String.
The generated password will be in the form of 'password{salt}'.
A None can be passed to either parameter, and will be handled correctly. If the salt is None or empty,
the resulting generated password will simply be the passed password. The __str__ method of the salt will be used to represent the salt.
Data descriptors inherited from PasswordEncoder:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
|
class BasePasswordEncoder(PasswordEncoder) |
|
Convenience base for all password encoders. |
|
- Method resolution order:
- BasePasswordEncoder
- PasswordEncoder
- __builtin__.object
Methods defined here:
- __init__(self)
- mergePasswordAndSalt(self, password, salt, strict)
- Used by subclasses to generate a merged password and salt String.
The generated password will be in the form of 'password{salt}'.
A None can be passed to either parameter, and will be handled correctly. If the salt is None or empty,
the resulting generated password will simply be the passed password. The __str__ method of the salt will be used to represent the salt.
Methods inherited from PasswordEncoder:
- encodePassword(self, rawPass, salt)
- Encodes the specified raw password with an implementation specific algorithm.
- isPasswordValid(self, encPass, rawPass, salt)
- Validates a specified "raw" password against an encoded password.
Data descriptors inherited from PasswordEncoder:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
|
class Md5PasswordEncoder(AbstractOneWayPasswordEncoder) |
|
MD5 implementation of PasswordEncoder.
If a None password is presented, it will be treated as an empty String ("") password.
As MD5 is a one-way hash, the salt can contain any characters. |
|
- Method resolution order:
- Md5PasswordEncoder
- AbstractOneWayPasswordEncoder
- BasePasswordEncoder
- PasswordEncoder
- __builtin__.object
Methods defined here:
- __init__(self)
Methods inherited from AbstractOneWayPasswordEncoder:
- encodePassword(self, rawPass, salt)
- Encodes the specified raw password with an implementation specific algorithm.
- isPasswordValid(self, encPass, rawPass, salt)
- Validates a specified "raw" password against an encoded password.
Methods inherited from BasePasswordEncoder:
- mergePasswordAndSalt(self, password, salt, strict)
- Used by subclasses to generate a merged password and salt String.
The generated password will be in the form of 'password{salt}'.
A None can be passed to either parameter, and will be handled correctly. If the salt is None or empty,
the resulting generated password will simply be the passed password. The __str__ method of the salt will be used to represent the salt.
Data descriptors inherited from PasswordEncoder:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
|
class PasswordEncoder(__builtin__.object) |
|
Interface for performing authentication operations on a password. |
|
Methods defined here:
- encodePassword(self, rawPass, salt)
- Encodes the specified raw password with an implementation specific algorithm.
- isPasswordValid(self, encPass, rawPass, salt)
- Validates a specified "raw" password against an encoded password.
Data descriptors defined here:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
|
class PlaintextPasswordEncoder(BasePasswordEncoder) |
|
Plaintext implementation of PasswordEncoder.
As callers may wish to extract the password and salts separately from the encoded password,
the salt must not contain reserved characters (specifically '{' and '}'). |
|
- Method resolution order:
- PlaintextPasswordEncoder
- BasePasswordEncoder
- PasswordEncoder
- __builtin__.object
Methods defined here:
- __init__(self)
- encodePassword(self, rawPass, salt)
- Encodes the specified raw password with an implementation specific algorithm.
- isPasswordValid(self, encPass, rawPass, salt)
- Validates a specified "raw" password against an encoded password.
Methods inherited from BasePasswordEncoder:
- mergePasswordAndSalt(self, password, salt, strict)
- Used by subclasses to generate a merged password and salt String.
The generated password will be in the form of 'password{salt}'.
A None can be passed to either parameter, and will be handled correctly. If the salt is None or empty,
the resulting generated password will simply be the passed password. The __str__ method of the salt will be used to represent the salt.
Data descriptors inherited from PasswordEncoder:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
|
class ShaPasswordEncoder(AbstractOneWayPasswordEncoder) |
|
SHA implementation of PasswordEncoder.
If a None password is presented, it will be treated as an empty String ("") password.
As SHA is a one-way hash, the salt can contain any characters. |
|
- Method resolution order:
- ShaPasswordEncoder
- AbstractOneWayPasswordEncoder
- BasePasswordEncoder
- PasswordEncoder
- __builtin__.object
Methods defined here:
- __init__(self)
Methods inherited from AbstractOneWayPasswordEncoder:
- encodePassword(self, rawPass, salt)
- Encodes the specified raw password with an implementation specific algorithm.
- isPasswordValid(self, encPass, rawPass, salt)
- Validates a specified "raw" password against an encoded password.
Methods inherited from BasePasswordEncoder:
- mergePasswordAndSalt(self, password, salt, strict)
- Used by subclasses to generate a merged password and salt String.
The generated password will be in the form of 'password{salt}'.
A None can be passed to either parameter, and will be handled correctly. If the salt is None or empty,
the resulting generated password will simply be the passed password. The __str__ method of the salt will be used to represent the salt.
Data descriptors inherited from PasswordEncoder:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
| |