Peach :: Transformers :: crypto :: ApacheMd5Crypt :: Class ApacheMd5Crypt
[hide private]

Class ApacheMd5Crypt

source code


Apache style MD5 crypt. If no salt is specified will use first two chars of data, ala pwd style.

Uses '$apr1$' as magic.

From underlying docs:

apache_md5_crypt() provides a function compatible with Apache's .htpasswd files. This was contributed by Bryan Hart <bryan@eai.com>.

"THE BEER-WARE LICENSE" (Revision 42): <phk@login.dknet.dk> wrote this file. As long as you retain this notice you can do whatever you want with this stuff. If we meet some day, and you think this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp

Instance Methods [hide private]
 
__init__(self, salt=None)
Create Transformer object.
source code
string
realEncode(self, data)
Override this to implement your transform.
source code

Inherited from transformer.Transformer: decode, encode, getAnotherTransformer, realDecode, setAnotherTransformer, transform

Static Methods [hide private]
 
unittest() source code
Class Variables [hide private]
  _salt = None
Method Details [hide private]

__init__(self, salt=None)
(Constructor)

source code 

Create Transformer object.

Parameters:
  • salt (string) - Salt for crypt (optional)
Overrides: transformer.Transformer.__init__

realEncode(self, data)

source code 

Override this to implement your transform.

Parameters:
  • data - Data to transform
Returns: string
transformed data
Overrides: transformer.Transformer.realEncode
(inherited documentation)