This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from Crypto.Cipher import DES | |
from hashlib import md5 | |
class PBEWithMD5AndDES(object): | |
"""PBES1 implementation according to RFC 2898 section 6.1""" | |
SALT = '\x0c\x9d\x4a\xe4\x1e\x83\x15\xfc' | |
COUNT = 5 | |
def __init__(self, key): | |
key = self._generate_key(key, self.SALT, self.COUNT, 16) |