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.py183 def pbkdf2_hmac(hash_name, password, salt, iterations, dklen=None): argument
219 if dklen is None:
220 dklen = outer.digest_size
221 if dklen < 1:
222 raise ValueError(dklen)
227 while len(dkey) < dklen:
238 return dkey[:dklen]
/external/python/cpython3/Modules/
D_hashopenssl.c764 long dklen; in pbkdf2_hmac_impl() local
798 dklen = EVP_MD_size(digest); in pbkdf2_hmac_impl()
800 dklen = PyLong_AsLong(dklen_obj); in pbkdf2_hmac_impl()
801 if ((dklen == -1) && PyErr_Occurred()) { in pbkdf2_hmac_impl()
805 if (dklen < 1) { in pbkdf2_hmac_impl()
810 if (dklen > INT_MAX) { in pbkdf2_hmac_impl()
817 key_obj = PyBytes_FromStringAndSize(NULL, dklen); in pbkdf2_hmac_impl()
826 iterations, digest, dklen, in pbkdf2_hmac_impl()
866 long maxmem, long dklen) in _hashlib_scrypt_impl() argument
926 if (dklen < 1 || dklen > INT_MAX) { in _hashlib_scrypt_impl()
[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.py919 password, salt, rounds, dklen = vector
922 dklen = overwrite_dklen
923 out = pbkdf2(digest_name, password, salt, rounds, dklen)
925 (digest_name, password, salt, rounds, dklen))
927 memoryview(salt), rounds, dklen)
929 bytearray(salt), rounds, dklen)
931 if dklen is None:
945 iterations=1, dklen=None)
991 for dklen in [-1, None]:
994 dklen=dklen)
/external/python/cpython3/Modules/clinic/
D_hashopenssl.c.h438 long maxmem, long dklen);
454 long dklen = 64; in _hashlib_scrypt() local
531 dklen = PyLong_AsLong(args[6]); in _hashlib_scrypt()
532 if (dklen == -1 && PyErr_Occurred()) { in _hashlib_scrypt()
536 … return_value = _hashlib_scrypt_impl(module, &password, &salt, n_obj, r_obj, p_obj, maxmem, dklen); in _hashlib_scrypt()
/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.