Lines Matching defs:digest

133     /* blake2 digest */
230 EVP_MD_CTX *ctx; /* OpenSSL message digest context */
323 PY_EVP_MD *digest = NULL;
337 digest = entry->evp;
343 digest = entry->evp_nosecurity;
346 if (digest != NULL) {
347 PY_EVP_MD_up_ref(digest);
355 digest = PY_EVP_MD_fetch(name, NULL);
358 digest = PY_EVP_MD_fetch(name, "-fips");
362 if (digest == NULL) {
366 return digest;
369 /* Get digest EVP from object
499 _hashlib.HASH.digest as EVP_digest
501 Return the digest value as a bytes object.
508 unsigned char digest[EVP_MAX_MD_SIZE];
523 if (!EVP_DigestFinal(temp_ctx, digest, NULL)) {
528 retval = PyBytes_FromStringAndSize((const char *)digest, digest_size);
536 Return the digest value as a string of hexadecimal digits.
543 unsigned char digest[EVP_MAX_MD_SIZE];
553 /* Get the raw (binary) digest value */
558 if (!EVP_DigestFinal(temp_ctx, digest, NULL)) {
565 return _Py_strhex((const char *)digest, (Py_ssize_t)digest_size);
677 "update() -- updates the current digest with an additional string\n"
678 "digest() -- return the current digest value\n"
679 "hexdigest() -- return the current digest as a string of hexadecimal digits\n"
707 _hashlib.HASHXOF.digest as EVPXOF_digest
711 Return the digest value as a bytes object.
755 Return the digest value as a string of hexadecimal digits.
762 unsigned char *digest;
766 digest = (unsigned char*)PyMem_Malloc(length);
767 if (digest == NULL) {
774 PyMem_Free(digest);
779 /* Get the raw (binary) digest value */
781 PyMem_Free(digest);
785 if (!EVP_DigestFinalXOF(temp_ctx, digest, length)) {
786 PyMem_Free(digest);
794 retval = _Py_strhex((const char *)digest, length);
795 PyMem_Free(digest);
828 "update() -- updates the current digest with an additional string\n"
829 "digest(length) -- return the current digest value\n"
830 "hexdigest(length) -- return the current digest as a string of hexadecimal digits\n"
861 PY_EVP_MD *digest = NULL;
869 digest = py_digest_by_name(
872 if (digest == NULL) {
876 if ((EVP_MD_flags(digest) & EVP_MD_FLAG_XOF) == EVP_MD_FLAG_XOF) {
895 int result = EVP_DigestInit_ex(self->ctx, digest, NULL);
920 if (digest != NULL) {
921 PY_EVP_MD_free(digest);
1222 PY_EVP_MD *digest = py_digest_by_name(module, hash_name, Py_ht_pbkdf2);
1223 if (digest == NULL) {
1251 dklen = EVP_MD_size(digest);
1279 iterations, digest, dklen,
1290 if (digest != NULL) {
1291 PY_EVP_MD_free(digest);
1419 /* Fast HMAC for hmac.digest()
1427 digest: object
1434 Py_buffer *msg, PyObject *digest)
1453 evp = py_digest_by_digestmod(module, digest, Py_ht_mac);
1496 PY_EVP_MD *digest;
1513 digest = py_digest_by_digestmod(module, digestmod, Py_ht_mac);
1514 if (digest == NULL) {
1528 digest,
1530 PY_EVP_MD_free(digest);
1705 _hashlib.HMAC.digest
1706 Return the digest of the bytes passed to the update() method so far.
1713 unsigned char digest[EVP_MAX_MD_SIZE];
1718 int r = _hmac_digest(self, digest, digest_size);
1722 return PyBytes_FromStringAndSize((const char *)digest, digest_size);
1728 Return hexadecimal digest of the bytes passed to the update() method so far.
1738 unsigned char digest[EVP_MAX_MD_SIZE];
1743 int r = _hmac_digest(self, digest, digest_size);
1747 return _Py_strhex((const char *)digest, digest_size);
1803 update() -- updates the current digest with an additional string\n\
1804 digest() -- return the current digest value\n\
1805 hexdigest() -- return the current digest as a string of hexadecimal digits\n\
1811 digest_size -- number of bytes in digest() output\n");