22
28
long_to_bytes = lambda x: _long.pack(x)
25
37
def pbkdf2_sha256(password, salt, iterations, size):
26
40
key = create_string_buffer(size)
27
41
rv = libcrypto.PKCS5_PBKDF2_HMAC(password, len(password), salt, len(salt), iterations, libcrypto.EVP_sha256(), size, key)