PostgreSQL Source Code git master
|
Go to the source code of this file.
Data Structures | |
union | pg_checksum_raw_context |
struct | pg_checksum_context |
Macros | |
#define | PG_CHECKSUM_MAX_LENGTH PG_SHA512_DIGEST_LENGTH |
Typedefs | |
typedef enum pg_checksum_type | pg_checksum_type |
typedef union pg_checksum_raw_context | pg_checksum_raw_context |
typedef struct pg_checksum_context | pg_checksum_context |
Enumerations | |
enum | pg_checksum_type { CHECKSUM_TYPE_NONE , CHECKSUM_TYPE_CRC32C , CHECKSUM_TYPE_SHA224 , CHECKSUM_TYPE_SHA256 , CHECKSUM_TYPE_SHA384 , CHECKSUM_TYPE_SHA512 } |
Functions | |
bool | pg_checksum_parse_type (char *name, pg_checksum_type *) |
char * | pg_checksum_type_name (pg_checksum_type) |
int | pg_checksum_init (pg_checksum_context *, pg_checksum_type) |
int | pg_checksum_update (pg_checksum_context *, const uint8 *input, size_t len) |
int | pg_checksum_final (pg_checksum_context *, uint8 *output) |
#define PG_CHECKSUM_MAX_LENGTH PG_SHA512_DIGEST_LENGTH |
Definition at line 62 of file checksum_helper.h.
typedef struct pg_checksum_context pg_checksum_context |
typedef union pg_checksum_raw_context pg_checksum_raw_context |
typedef enum pg_checksum_type pg_checksum_type |
enum pg_checksum_type |
Enumerator | |
---|---|
CHECKSUM_TYPE_NONE | |
CHECKSUM_TYPE_CRC32C | |
CHECKSUM_TYPE_SHA224 | |
CHECKSUM_TYPE_SHA256 | |
CHECKSUM_TYPE_SHA384 | |
CHECKSUM_TYPE_SHA512 |
Definition at line 29 of file checksum_helper.h.
int pg_checksum_final | ( | pg_checksum_context * | context, |
uint8 * | output | ||
) |
Definition at line 176 of file checksum_helper.c.
References Assert, pg_checksum_raw_context::c_crc32c, pg_checksum_raw_context::c_sha2, CHECKSUM_TYPE_CRC32C, CHECKSUM_TYPE_NONE, CHECKSUM_TYPE_SHA224, CHECKSUM_TYPE_SHA256, CHECKSUM_TYPE_SHA384, CHECKSUM_TYPE_SHA512, FIN_CRC32C, output, PG_CHECKSUM_MAX_LENGTH, pg_cryptohash_final(), pg_cryptohash_free(), PG_SHA224_DIGEST_LENGTH, PG_SHA256_DIGEST_LENGTH, PG_SHA384_DIGEST_LENGTH, PG_SHA512_DIGEST_LENGTH, pg_checksum_context::raw_context, StaticAssertDecl, and pg_checksum_context::type.
Referenced by AddFileToBackupManifest(), finalize_manifest(), member_verify_checksum(), process_directory_recursively(), reconstruct_from_incremental_file(), verify_file_checksum(), and write_backup_label().
int pg_checksum_init | ( | pg_checksum_context * | context, |
pg_checksum_type | type | ||
) |
Definition at line 83 of file checksum_helper.c.
References pg_checksum_raw_context::c_crc32c, pg_checksum_raw_context::c_sha2, CHECKSUM_TYPE_CRC32C, CHECKSUM_TYPE_NONE, CHECKSUM_TYPE_SHA224, CHECKSUM_TYPE_SHA256, CHECKSUM_TYPE_SHA384, CHECKSUM_TYPE_SHA512, INIT_CRC32C, pg_cryptohash_create(), pg_cryptohash_free(), pg_cryptohash_init(), PG_SHA224, PG_SHA256, PG_SHA384, PG_SHA512, pg_checksum_context::raw_context, type, and pg_checksum_context::type.
Referenced by create_manifest_writer(), member_verify_header(), process_directory_recursively(), reconstruct_from_incremental_file(), sendFile(), sendFileWithContent(), verify_file_checksum(), and write_backup_label().
bool pg_checksum_parse_type | ( | char * | name, |
pg_checksum_type * | type | ||
) |
Definition at line 28 of file checksum_helper.c.
References CHECKSUM_TYPE_CRC32C, CHECKSUM_TYPE_NONE, CHECKSUM_TYPE_SHA224, CHECKSUM_TYPE_SHA256, CHECKSUM_TYPE_SHA384, CHECKSUM_TYPE_SHA512, name, pg_strcasecmp(), and type.
Referenced by json_manifest_finalize_file(), main(), and parse_basebackup_options().
char * pg_checksum_type_name | ( | pg_checksum_type | type | ) |
Definition at line 56 of file checksum_helper.c.
References Assert, CHECKSUM_TYPE_CRC32C, CHECKSUM_TYPE_NONE, CHECKSUM_TYPE_SHA224, CHECKSUM_TYPE_SHA256, CHECKSUM_TYPE_SHA384, CHECKSUM_TYPE_SHA512, and type.
Referenced by add_file_to_manifest(), AddFileToBackupManifest(), copy_file(), and write_reconstructed_file().
int pg_checksum_update | ( | pg_checksum_context * | context, |
const uint8 * | input, | ||
size_t | len | ||
) |
Definition at line 145 of file checksum_helper.c.
References pg_checksum_raw_context::c_crc32c, pg_checksum_raw_context::c_sha2, CHECKSUM_TYPE_CRC32C, CHECKSUM_TYPE_NONE, CHECKSUM_TYPE_SHA224, CHECKSUM_TYPE_SHA256, CHECKSUM_TYPE_SHA384, CHECKSUM_TYPE_SHA512, COMP_CRC32C, input, len, pg_cryptohash_update(), pg_checksum_context::raw_context, and pg_checksum_context::type.
Referenced by checksum_file(), copy_file_blocks(), flush_manifest(), member_compute_checksum(), push_to_sink(), sendFile(), sendFileWithContent(), verify_file_checksum(), write_backup_label(), write_block(), and write_reconstructed_file().