Home
last modified time | relevance | path

Searched refs:dklen (Results 1 – 9 of 9) sorted by relevance

/external/python/cpython2/Lib/
Dhashlib.py163 def pbkdf2_hmac(hash_name, password, salt, iterations, dklen=None): argument
199 if dklen is None:
200 dklen = outer.digest_size
201 if dklen < 1:
202 raise ValueError(dklen)
208 while len(dkey) < dklen:
217 return dkey[:dklen]
/external/python/cpython3/Lib/
Dhashlib.py176 def pbkdf2_hmac(hash_name, password, salt, iterations, dklen=None): argument
212 if dklen is None:
213 dklen = outer.digest_size
214 if dklen < 1:
215 raise ValueError(dklen)
220 while len(dkey) < dklen:
231 return dkey[:dklen]
/external/python/cpython3/Modules/clinic/
D_hashopenssl.c.h20 long maxmem, long dklen);
34 long dklen = 64; in _hashlib_scrypt() local
37 …sword, &salt, &PyLong_Type, &n_obj, &PyLong_Type, &r_obj, &PyLong_Type, &p_obj, &maxmem, &dklen)) { in _hashlib_scrypt()
40 … return_value = _hashlib_scrypt_impl(module, &password, &salt, n_obj, r_obj, p_obj, maxmem, dklen); in _hashlib_scrypt()
/external/python/cpython3/Modules/
D_hashopenssl.c638 long iterations, dklen; in pbkdf2_hmac() local
678 dklen = EVP_MD_size(digest); in pbkdf2_hmac()
680 dklen = PyLong_AsLong(dklen_obj); in pbkdf2_hmac()
681 if ((dklen == -1) && PyErr_Occurred()) { in pbkdf2_hmac()
685 if (dklen < 1) { in pbkdf2_hmac()
690 if (dklen > INT_MAX) { in pbkdf2_hmac()
697 key_obj = PyBytes_FromStringAndSize(NULL, dklen); in pbkdf2_hmac()
707 iterations, digest, dklen, in pbkdf2_hmac()
712 iterations, digest, dklen, in pbkdf2_hmac()
757 long maxmem, long dklen) in _hashlib_scrypt_impl() argument
[all …]
/external/python/cpython2/Modules/
D_hashopenssl.c672 long iterations, dklen; in pbkdf2_hmac() local
712 dklen = EVP_MD_size(digest); in pbkdf2_hmac()
714 dklen = PyLong_AsLong(dklen_obj); in pbkdf2_hmac()
715 if ((dklen == -1) && PyErr_Occurred()) { in pbkdf2_hmac()
719 if (dklen < 1) { in pbkdf2_hmac()
724 if (dklen > INT_MAX) { in pbkdf2_hmac()
731 key_obj = PyBytes_FromStringAndSize(NULL, dklen); in pbkdf2_hmac()
741 iterations, digest, dklen, in pbkdf2_hmac()
746 iterations, digest, dklen, in pbkdf2_hmac()
/external/python/cpython3/Lib/test/
Dtest_hashlib.py900 password, salt, rounds, dklen = vector
903 dklen = overwrite_dklen
904 out = pbkdf2(digest_name, password, salt, rounds, dklen)
906 (digest_name, password, salt, rounds, dklen))
908 memoryview(salt), rounds, dklen)
910 bytearray(salt), rounds, dklen)
912 if dklen is None:
926 iterations=1, dklen=None)
972 for dklen in [-1, None]:
975 dklen=dklen)
/external/python/cpython2/Lib/test/
Dtest_hashlib.py450 password, salt, rounds, dklen = vector
453 dklen = overwrite_dklen
455 digest_name, password, salt, rounds, dklen)
457 (digest_name, password, salt, rounds, dklen))
/external/python/cpython2/Doc/library/
Dhashlib.rst165 .. function:: pbkdf2_hmac(name, password, salt, rounds, dklen=None)
179 *dklen* is the length of the derived key. If *dklen* is ``None`` then the
/external/python/cpython3/Doc/library/
Dhashlib.rst229 .. function:: pbkdf2_hmac(hash_name, password, salt, iterations, dklen=None)
244 *dklen* is the length of the derived key. If *dklen* is ``None`` then the
260 .. function:: scrypt(password, *, salt, n, r, p, maxmem=0, dklen=64)
272 *dklen* is the length of the derived key.