71 "Several keys given - pgcrypto does not handle keyring"},
98 (
errcode(ERRCODE_INTERNAL_ERROR),
99 errmsg(
"could not generate a random number")));
105 (
errcode(ERRCODE_EXTERNAL_ROUTINE_INVOCATION_EXCEPTION),
118 return "Bad error code";
182 const uint8 *iv,
unsigned ivlen)
198 memcpy(ivbuf, iv, ivs);
200 memcpy(ivbuf, iv, ivlen);
206 memcpy(keybuf,
key, klen);
252 p = strchr(full,
'/');
257 if ((q = strchr(p,
'/')) != NULL)
269 if (strcmp(p,
"pad") == 0)
311 if (strcmp(s_pad,
"pkcs") == 0)
313 else if (strcmp(s_pad,
"none") == 0)
static void PGresult const char * p2
static void PGresult * res
int errcode(int sqlerrcode)
int errmsg(const char *fmt,...)
#define ereport(elevel,...)
void err(int eval, const char *fmt,...)
int cx(PlannerInfo *root, Gene *tour1, Gene *tour2, Gene *offspring, int num_gene, City *city_table)
static void const char * fmt
char * pstrdup(const char *in)
void pfree(void *pointer)
void * palloc0(Size size)
int px_find_cipher(const char *name, PX_Cipher **res)
int pg_strcasecmp(const char *s1, const char *s2)
void px_THROW_ERROR(int err)
static void combo_free(PX_Combo *cx)
static int combo_encrypt(PX_Combo *cx, const uint8 *data, unsigned dlen, uint8 *res, unsigned *rlen)
static int parse_cipher_name(char *full, char **cipher, char **pad)
static const struct error_desc px_err_list[]
const char * px_resolve_alias(const PX_Alias *list, const char *name)
static int combo_decrypt(PX_Combo *cx, const uint8 *data, unsigned dlen, uint8 *res, unsigned *rlen)
static unsigned combo_decrypt_len(PX_Combo *cx, unsigned dlen)
const char * px_strerror(int err)
void px_debug(const char *fmt,...)
static unsigned combo_encrypt_len(PX_Combo *cx, unsigned dlen)
static void(* debug_handler)(const char *)
void px_set_debug_handler(void(*handler)(const char *))
static int combo_init(PX_Combo *cx, const uint8 *key, unsigned klen, const uint8 *iv, unsigned ivlen)
int px_find_combo(const char *name, PX_Combo **res)
void px_memset(void *ptr, int c, size_t len)
#define px_cipher_decrypt(c, padding, data, dlen, res, rlen)
#define PXE_PGP_EXPECT_PUBLIC_KEY
#define px_cipher_free(c)
#define PXE_PGP_UNSUPPORTED_COMPR
#define PXE_PGP_BAD_S2K_MODE
#define PXE_DECRYPT_FAILED
#define px_cipher_iv_size(c)
#define PXE_ARGUMENT_ERROR
#define PXE_BAD_SALT_ROUNDS
#define PXE_PGP_UNEXPECTED_PKT
#define PXE_PGP_MULTIPLE_KEYS
#define PXE_ENCRYPT_FAILED
#define PXE_PGP_UNSUPPORTED_PUBALGO
#define PXE_PGP_NO_USABLE_KEY
#define PXE_PGP_EXPECT_SECRET_KEY
#define PXE_HASH_UNUSABLE_FOR_HMAC
#define PXE_PGP_NEED_SECRET_PSW
#define PXE_PGP_MULTIPLE_SUBKEYS
#define PXE_PGP_COMPRESSION_ERROR
#define PXE_PGP_WRONG_KEY
#define PXE_PGP_CORRUPT_DATA
#define PXE_UNKNOWN_SALT_ALGO
#define PXE_PGP_MATH_FAILED
#define PXE_PGP_UNSUPPORTED_CIPHER
#define px_cipher_encrypt(c, padding, data, dlen, res, rlen)
#define PXE_PGP_UNKNOWN_PUBALGO
#define PXE_PGP_SHORT_ELGAMAL_KEY
#define PXE_PGP_CORRUPT_ARMOR
#define PXE_PGP_KEYPKT_CORRUPT
#define px_cipher_init(c, k, klen, iv)
#define PXE_PGP_UNSUPPORTED_HASH
#define px_cipher_key_size(c)
#define PXE_PGP_NOT_V4_KEYPKT