|
PostgreSQL Source Code git master
|
#include "postgres.h"#include <ctype.h>#include "parser/scansup.h"#include "pgcrypto.h"#include "px-crypt.h"#include "px.h"#include "utils/builtins.h"#include "utils/guc.h"#include "varatt.h"
Go to the source code of this file.
Typedefs | |
| typedef int(* | PFN) (const char *name, void **res) |
Variables | |
| static const struct config_enum_entry | builtin_crypto_options [] |
| int | builtin_crypto_enabled = BC_ON |
| typedef int(* PFN) (const char *name, void **res) |
Definition at line 58 of file pgcrypto.c.
| void _PG_init | ( | void | ) |
Definition at line 68 of file pgcrypto.c.
References BC_ON, builtin_crypto_enabled, builtin_crypto_options, DefineCustomEnumVariable(), MarkGUCPrefixReserved(), and PGC_SUSET.
|
static |
Definition at line 496 of file pgcrypto.c.
References buf, downcase_truncate_identifier(), ereport, err(), errcode(), errmsg(), ERROR, name, pfree(), px_strerror(), VARDATA_ANY(), and VARSIZE_ANY_EXHDR().
Referenced by pg_decrypt(), pg_decrypt_iv(), pg_digest(), pg_encrypt(), pg_encrypt_iv(), and pg_hmac().
| Datum pg_check_fipsmode | ( | PG_FUNCTION_ARGS | ) |
Definition at line 490 of file pgcrypto.c.
References CheckFIPSMode(), and PG_RETURN_BOOL.
| Datum pg_crypt | ( | PG_FUNCTION_ARGS | ) |
Definition at line 213 of file pgcrypto.c.
References cstring_to_text(), ereport, errcode(), errmsg(), ERROR, palloc0(), pfree(), PG_FREE_IF_COPY, PG_GETARG_TEXT_PP, PG_RETURN_TEXT_P, px_crypt(), PX_MAX_CRYPT, and text_to_cstring().
| Datum pg_decrypt | ( | PG_FUNCTION_ARGS | ) |
Definition at line 301 of file pgcrypto.c.
References data, ereport, err(), errcode(), errmsg(), ERROR, find_provider(), sort-test::key, palloc(), PG_FREE_IF_COPY, PG_GETARG_BYTEA_PP, PG_GETARG_TEXT_PP, PG_RETURN_BYTEA_P, px_combo_decrypt, px_combo_decrypt_len, px_combo_free, px_combo_init, px_find_combo(), px_strerror(), SET_VARSIZE(), type, VARDATA(), VARDATA_ANY(), VARHDRSZ, and VARSIZE_ANY_EXHDR().
| Datum pg_decrypt_iv | ( | PG_FUNCTION_ARGS | ) |
Definition at line 403 of file pgcrypto.c.
References data, ereport, err(), errcode(), errmsg(), ERROR, find_provider(), sort-test::key, palloc(), PG_FREE_IF_COPY, PG_GETARG_BYTEA_PP, PG_GETARG_TEXT_PP, PG_RETURN_BYTEA_P, px_combo_decrypt, px_combo_decrypt_len, px_combo_free, px_combo_init, px_find_combo(), px_strerror(), SET_VARSIZE(), type, VARDATA(), VARDATA_ANY(), VARHDRSZ, and VARSIZE_ANY_EXHDR().
| Datum pg_digest | ( | PG_FUNCTION_ARGS | ) |
Definition at line 89 of file pgcrypto.c.
References arg, find_provider(), len, name, palloc(), PG_FREE_IF_COPY, PG_GETARG_BYTEA_PP, PG_GETARG_TEXT_PP, PG_RETURN_BYTEA_P, px_find_digest(), px_md_finish, px_md_free, px_md_result_size, px_md_update, SET_VARSIZE(), VARDATA(), VARDATA_ANY(), VARHDRSZ, and VARSIZE_ANY_EXHDR().
| Datum pg_encrypt | ( | PG_FUNCTION_ARGS | ) |
Definition at line 252 of file pgcrypto.c.
References data, ereport, err(), errcode(), errmsg(), ERROR, find_provider(), sort-test::key, palloc(), pfree(), PG_FREE_IF_COPY, PG_GETARG_BYTEA_PP, PG_GETARG_TEXT_PP, PG_RETURN_BYTEA_P, px_combo_encrypt, px_combo_encrypt_len, px_combo_free, px_combo_init, px_find_combo(), px_strerror(), SET_VARSIZE(), type, VARDATA(), VARDATA_ANY(), VARHDRSZ, and VARSIZE_ANY_EXHDR().
| Datum pg_encrypt_iv | ( | PG_FUNCTION_ARGS | ) |
Definition at line 349 of file pgcrypto.c.
References data, ereport, err(), errcode(), errmsg(), ERROR, find_provider(), sort-test::key, palloc(), PG_FREE_IF_COPY, PG_GETARG_BYTEA_PP, PG_GETARG_TEXT_PP, PG_RETURN_BYTEA_P, px_combo_encrypt, px_combo_encrypt_len, px_combo_free, px_combo_init, px_find_combo(), px_strerror(), SET_VARSIZE(), type, VARDATA(), VARDATA_ANY(), VARHDRSZ, and VARSIZE_ANY_EXHDR().
| PG_FUNCTION_INFO_V1 | ( | pg_check_fipsmode | ) |
| PG_FUNCTION_INFO_V1 | ( | pg_crypt | ) |
| PG_FUNCTION_INFO_V1 | ( | pg_decrypt | ) |
| PG_FUNCTION_INFO_V1 | ( | pg_decrypt_iv | ) |
| PG_FUNCTION_INFO_V1 | ( | pg_digest | ) |
| PG_FUNCTION_INFO_V1 | ( | pg_encrypt | ) |
| PG_FUNCTION_INFO_V1 | ( | pg_encrypt_iv | ) |
| PG_FUNCTION_INFO_V1 | ( | pg_gen_salt | ) |
| PG_FUNCTION_INFO_V1 | ( | pg_gen_salt_rounds | ) |
| PG_FUNCTION_INFO_V1 | ( | pg_hmac | ) |
| PG_FUNCTION_INFO_V1 | ( | pg_random_bytes | ) |
| PG_FUNCTION_INFO_V1 | ( | pg_random_uuid | ) |
| Datum pg_gen_salt | ( | PG_FUNCTION_ARGS | ) |
Definition at line 168 of file pgcrypto.c.
References buf, cstring_to_text_with_len(), ereport, errcode(), errmsg(), ERROR, len, PG_FREE_IF_COPY, PG_GETARG_TEXT_PP, PG_RETURN_TEXT_P, px_gen_salt(), PX_MAX_SALT_LEN, px_strerror(), and text_to_cstring_buffer().
| Datum pg_gen_salt_rounds | ( | PG_FUNCTION_ARGS | ) |
Definition at line 190 of file pgcrypto.c.
References buf, cstring_to_text_with_len(), ereport, errcode(), errmsg(), ERROR, len, PG_FREE_IF_COPY, PG_GETARG_INT32, PG_GETARG_TEXT_PP, PG_RETURN_TEXT_P, px_gen_salt(), PX_MAX_SALT_LEN, px_strerror(), and text_to_cstring_buffer().
| Datum pg_hmac | ( | PG_FUNCTION_ARGS | ) |
Definition at line 125 of file pgcrypto.c.
References arg, find_provider(), sort-test::key, len, name, palloc(), PG_FREE_IF_COPY, PG_GETARG_BYTEA_PP, PG_GETARG_TEXT_PP, PG_RETURN_BYTEA_P, px_find_hmac(), px_hmac_finish, px_hmac_free, px_hmac_init, px_hmac_result_size, px_hmac_update, SET_VARSIZE(), VARDATA(), VARDATA_ANY(), VARHDRSZ, and VARSIZE_ANY_EXHDR().
| PG_MODULE_MAGIC_EXT | ( | . | name = "pgcrypto", |
| . | version = PG_VERSION |
||
| ) |
| Datum pg_random_bytes | ( | PG_FUNCTION_ARGS | ) |
Definition at line 457 of file pgcrypto.c.
References ereport, errcode(), errmsg(), ERROR, len, palloc(), PG_GETARG_INT32, PG_RETURN_BYTEA_P, pg_strong_random(), px_THROW_ERROR(), PXE_NO_RANDOM, SET_VARSIZE(), VARDATA(), and VARHDRSZ.
| Datum pg_random_uuid | ( | PG_FUNCTION_ARGS | ) |
Definition at line 481 of file pgcrypto.c.
References gen_random_uuid().
| int builtin_crypto_enabled = BC_ON |
Definition at line 62 of file pgcrypto.c.
Referenced by _PG_init(), and CheckBuiltinCryptoMode().
|
static |
Definition at line 51 of file pgcrypto.c.
Referenced by _PG_init().