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 "varatt.h"
Go to the source code of this file.
Typedefs | |
typedef int(* | PFN) (const char *name, void **res) |
Variables | |
PG_MODULE_MAGIC | |
Definition at line 47 of file pgcrypto.c.
|
static |
Definition at line 454 of file pgcrypto.c.
References buf, downcase_truncate_identifier(), ereport, err(), errcode(), errmsg(), ERROR, name, pfree(), px_strerror(), res, 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_crypt | ( | PG_FUNCTION_ARGS | ) |
Definition at line 179 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, res, and text_to_cstring().
Datum pg_decrypt | ( | PG_FUNCTION_ARGS | ) |
Definition at line 267 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(), res, SET_VARSIZE, type, VARDATA, VARDATA_ANY, VARHDRSZ, and VARSIZE_ANY_EXHDR.
Datum pg_decrypt_iv | ( | PG_FUNCTION_ARGS | ) |
Definition at line 369 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(), res, SET_VARSIZE, type, VARDATA, VARDATA_ANY, VARHDRSZ, and VARSIZE_ANY_EXHDR.
Datum pg_digest | ( | PG_FUNCTION_ARGS | ) |
Definition at line 55 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, res, SET_VARSIZE, VARDATA, VARDATA_ANY, VARHDRSZ, and VARSIZE_ANY_EXHDR.
Datum pg_encrypt | ( | PG_FUNCTION_ARGS | ) |
Definition at line 218 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(), res, SET_VARSIZE, type, VARDATA, VARDATA_ANY, VARHDRSZ, and VARSIZE_ANY_EXHDR.
Datum pg_encrypt_iv | ( | PG_FUNCTION_ARGS | ) |
Definition at line 315 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(), res, SET_VARSIZE, type, VARDATA, VARDATA_ANY, VARHDRSZ, and VARSIZE_ANY_EXHDR.
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 134 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 156 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 91 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, res, SET_VARSIZE, VARDATA, VARDATA_ANY, VARHDRSZ, and VARSIZE_ANY_EXHDR.
Datum pg_random_bytes | ( | PG_FUNCTION_ARGS | ) |
Definition at line 423 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, res, SET_VARSIZE, VARDATA, and VARHDRSZ.
Datum pg_random_uuid | ( | PG_FUNCTION_ARGS | ) |
PG_MODULE_MAGIC |
Definition at line 43 of file pgcrypto.c.