PostgreSQL Source Code
git master
|
Go to the source code of this file.
Typedefs | |
typedef struct pg_cryptohash_ctx | pg_cryptohash_ctx |
Enumerations | |
enum | pg_cryptohash_type { PG_MD5 = 0 , PG_SHA1 , PG_SHA224 , PG_SHA256 , PG_SHA384 , PG_SHA512 } |
Functions | |
pg_cryptohash_ctx * | pg_cryptohash_create (pg_cryptohash_type type) |
int | pg_cryptohash_init (pg_cryptohash_ctx *ctx) |
int | pg_cryptohash_update (pg_cryptohash_ctx *ctx, const uint8 *data, size_t len) |
int | pg_cryptohash_final (pg_cryptohash_ctx *ctx, uint8 *dest, size_t len) |
void | pg_cryptohash_free (pg_cryptohash_ctx *ctx) |
const char * | pg_cryptohash_error (pg_cryptohash_ctx *ctx) |
typedef struct pg_cryptohash_ctx pg_cryptohash_ctx |
Definition at line 1 of file cryptohash.h.
enum pg_cryptohash_type |
Enumerator | |
---|---|
PG_MD5 | |
PG_SHA1 | |
PG_SHA224 | |
PG_SHA256 | |
PG_SHA384 | |
PG_SHA512 |
Definition at line 19 of file cryptohash.h.
pg_cryptohash_ctx* pg_cryptohash_create | ( | pg_cryptohash_type | type | ) |
Definition at line 74 of file cryptohash.c.
References ALLOC, CurrentResourceOwner, ereport, errcode(), errmsg(), pg_cryptohash_ctx::error, ERROR, pg_cryptohash_ctx::errreason, pg_cryptohash_ctx::evpctx, explicit_bzero(), FREE, PG_CRYPTOHASH_ERROR_NONE, ResourceOwnerEnlarge(), ResourceOwnerRememberCryptoHash(), pg_cryptohash_ctx::resowner, type, and pg_cryptohash_ctx::type.
Referenced by cryptohash_internal(), InitializeBackupManifest(), json_parse_manifest_incremental_init(), pg_checksum_init(), pg_hmac_create(), pg_hmac_init(), pg_md5_binary(), pg_md5_hash(), scram_H(), scram_mock_salt(), uuid_generate_internal(), and verify_manifest_checksum().
const char* pg_cryptohash_error | ( | pg_cryptohash_ctx * | ctx | ) |
Definition at line 254 of file cryptohash.c.
References _, Assert, pg_cryptohash_ctx::error, pg_cryptohash_ctx::errreason, PG_CRYPTOHASH_ERROR_DEST_LEN, PG_CRYPTOHASH_ERROR_NONE, and PG_CRYPTOHASH_ERROR_OPENSSL.
Referenced by AppendStringToManifest(), cryptohash_internal(), InitializeBackupManifest(), pg_hmac_final(), pg_hmac_init(), pg_hmac_update(), pg_md5_binary(), pg_md5_hash(), scram_H(), SendBackupManifest(), and uuid_generate_internal().
int pg_cryptohash_final | ( | pg_cryptohash_ctx * | ctx, |
uint8 * | dest, | ||
size_t | len | ||
) |
Definition at line 172 of file cryptohash.c.
References pg_cryptohash_ctx::data, generate_unaccent_rules::dest, pg_cryptohash_ctx::error, pg_cryptohash_ctx::errreason, pg_cryptohash_ctx::evpctx, len, pg_cryptohash_ctx::md5, MD5_DIGEST_LENGTH, PG_CRYPTOHASH_ERROR_DEST_LEN, PG_CRYPTOHASH_ERROR_OPENSSL, PG_MD5, pg_md5_final(), PG_SHA1, pg_sha1_final(), PG_SHA224, PG_SHA224_DIGEST_LENGTH, pg_sha224_final(), PG_SHA256, PG_SHA256_DIGEST_LENGTH, pg_sha256_final(), PG_SHA384, PG_SHA384_DIGEST_LENGTH, pg_sha384_final(), PG_SHA512, PG_SHA512_DIGEST_LENGTH, pg_sha512_final(), pg_cryptohash_ctx::sha1, SHA1_DIGEST_LENGTH, pg_cryptohash_ctx::sha224, pg_cryptohash_ctx::sha256, pg_cryptohash_ctx::sha384, pg_cryptohash_ctx::sha512, SSLerrmessage(), and pg_cryptohash_ctx::type.
Referenced by cryptohash_internal(), pg_checksum_final(), pg_hmac_final(), pg_hmac_init(), pg_md5_binary(), pg_md5_hash(), scram_H(), scram_mock_salt(), SendBackupManifest(), uuid_generate_internal(), and verify_manifest_checksum().
void pg_cryptohash_free | ( | pg_cryptohash_ctx * | ctx | ) |
Definition at line 238 of file cryptohash.c.
References pg_cryptohash_ctx::evpctx, explicit_bzero(), FREE, ResourceOwnerForgetCryptoHash(), and pg_cryptohash_ctx::resowner.
Referenced by cryptohash_internal(), FreeBackupManifest(), pg_checksum_final(), pg_checksum_init(), pg_hmac_free(), pg_hmac_init(), pg_md5_binary(), pg_md5_hash(), ResOwnerReleaseCryptoHash(), scram_H(), scram_mock_salt(), uuid_generate_internal(), and verify_manifest_checksum().
int pg_cryptohash_init | ( | pg_cryptohash_ctx * | ctx | ) |
Definition at line 100 of file cryptohash.c.
References pg_cryptohash_ctx::data, pg_cryptohash_ctx::error, pg_cryptohash_ctx::errreason, pg_cryptohash_ctx::evpctx, pg_cryptohash_ctx::md5, PG_CRYPTOHASH_ERROR_OPENSSL, PG_MD5, pg_md5_init(), PG_SHA1, pg_sha1_init(), PG_SHA224, pg_sha224_init(), PG_SHA256, pg_sha256_init(), PG_SHA384, pg_sha384_init(), PG_SHA512, pg_sha512_init(), pg_cryptohash_ctx::sha1, pg_cryptohash_ctx::sha224, pg_cryptohash_ctx::sha256, pg_cryptohash_ctx::sha384, pg_cryptohash_ctx::sha512, SSLerrmessage(), and pg_cryptohash_ctx::type.
Referenced by cryptohash_internal(), InitializeBackupManifest(), json_parse_manifest_incremental_init(), pg_checksum_init(), pg_hmac_final(), pg_hmac_init(), pg_md5_binary(), pg_md5_hash(), scram_H(), scram_mock_salt(), uuid_generate_internal(), and verify_manifest_checksum().
int pg_cryptohash_update | ( | pg_cryptohash_ctx * | ctx, |
const uint8 * | data, | ||
size_t | len | ||
) |
Definition at line 136 of file cryptohash.c.
References pg_cryptohash_ctx::data, data, pg_cryptohash_ctx::error, pg_cryptohash_ctx::errreason, pg_cryptohash_ctx::evpctx, len, pg_cryptohash_ctx::md5, PG_CRYPTOHASH_ERROR_OPENSSL, PG_MD5, pg_md5_update(), PG_SHA1, pg_sha1_update(), PG_SHA224, pg_sha224_update(), PG_SHA256, pg_sha256_update(), PG_SHA384, pg_sha384_update(), PG_SHA512, pg_sha512_update(), pg_cryptohash_ctx::sha1, pg_cryptohash_ctx::sha224, pg_cryptohash_ctx::sha256, pg_cryptohash_ctx::sha384, pg_cryptohash_ctx::sha512, SSLerrmessage(), and pg_cryptohash_ctx::type.
Referenced by AppendStringToManifest(), cryptohash_internal(), json_parse_manifest_incremental_chunk(), pg_checksum_update(), pg_hmac_final(), pg_hmac_init(), pg_hmac_update(), pg_md5_binary(), pg_md5_hash(), scram_H(), scram_mock_salt(), uuid_generate_internal(), and verify_manifest_checksum().