Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(3)  |  Call(2)  |  Derive(0)  |  Import(1)

src/l/a/Lampost-Mud-HEAD/lampost/util/encrypt.py   Lampost-Mud(Download)
from os import urandom
from base64 import b64encode, b64decode
from itertools import izip
from lampost.util.pdkdf2 import pbkdf2_bin
 
    return '{}${}'.format(
        salt,
        b64encode(pbkdf2_bin(password, salt, COST_FACTOR, KEY_LENGTH)))
 
 
    salt, existing_hash = full_hash.split('$')
    existing_hash = b64decode(existing_hash)
    entered_hash = pbkdf2_bin(password, salt, COST_FACTOR, KEY_LENGTH)
    diff = 0
    for char_a, char_b in izip(existing_hash, entered_hash):