Ñò *qRc @ s0 d Z d d k l Z d d k l Z d d k l Z d d k l Z y d d k l Z l Z Wnb e j oV d d k Z d d k Z e i d d !d j o d d k Z qÅ d d k l Z n Xd „ Z d e f d „ ƒ YZ d d d „ Z e e ƒ e _ d „ Z d „ Z e d j o e ƒ n d S( s 1.1iÿÿÿÿ( t pack( t b2a_hex( t randint( t b64encode( t HMACt SHANi i i ( t sha1c C sM d i g } t | | ƒ D]) \ } } | t t | ƒ t | ƒ Aƒ q ~ ƒ S( Nt ( t joint zipt chrt ord( t at bt _[1]t xt y( ( s8 /usr/lib/python2.6/site-packages/beaker/crypto/pbkdf2.pyt strxor] s t PBKDF2c B sV e Z d Z d e e d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z RS( sÐ PBKDF2.py : PKCS#5 v2.0 Password-Based Key Derivation This implementation takes a passphrase and a salt (and optionally an iteration count, a digest module, and a MAC module) and provides a file-like object from which an arbitrarily-sized key can be read. If the passphrase and/or salt are unicode objects, they are encoded as UTF-8 before they are processed. The idea behind PBKDF2 is to derive a cryptographic key from a passphrase and a salt. PBKDF2 may also be used as a strong salted password hash. The 'crypt' function is provided for that purpose. Remember: Keys generated using PBKDF2 are only as strong as the passphrases they are derived from. iè c C sI t | ƒ p | i } n | | _ | | _ | i | | | | i ƒ d S( N( t callablet newt _PBKDF2__macmodulet _PBKDF2__digestmodulet _setupt _pseudorandom( t selft passphraset saltt iterationst digestmodulet macmodule( ( s8 /usr/lib/python2.6/site-packages/beaker/crypto/pbkdf2.pyt __init__t s c C s% | i d | d | d | i ƒ i ƒ S( s&