struct PGP_Context
{ /* *parameters
*/
PGP_S2K s2k; int s2k_mode; int s2k_count; /* 4-byte decoded count */ int s2k_digest_algo; int s2k_cipher_algo; int cipher_algo; int compress_algo; int compress_level; int disable_mdc; int use_sess_key; int text_mode; int convert_crlf; int unicode_mode;
/* *internalvariables
*/ int mdc_checked; int corrupt_prefix; /* prefix failed RFC 4880 "quick check" */ int unsupported_compr; /* has bzip2 compression */ int unexpected_binary; /* binary data seen in text_mode */ int in_mdc_pkt; int use_mdcbuf_filter;
PX_MD *mdc_ctx;
PGP_PubKey *pub_key; /* ctx owns it */ const uint8 *sym_key; /* ctx does not own it */ int sym_key_len;
int pgp_init(PGP_Context **ctx_p); int pgp_encrypt(PGP_Context *ctx, MBuf *src, MBuf *dst); int pgp_decrypt(PGP_Context *ctx, MBuf *msrc, MBuf *mdst); int pgp_free(PGP_Context *ctx);
int pgp_get_digest_code(constchar *name); int pgp_get_cipher_code(constchar *name); constchar *pgp_get_digest_name(int code);
int pgp_set_cipher_algo(PGP_Context *ctx, constchar *name); int pgp_set_s2k_mode(PGP_Context *ctx, int mode); int pgp_set_s2k_count(PGP_Context *ctx, int count); int pgp_set_s2k_cipher_algo(PGP_Context *ctx, constchar *name); int pgp_set_s2k_digest_algo(PGP_Context *ctx, constchar *name); int pgp_set_convert_crlf(PGP_Context *ctx, int doit); int pgp_disable_mdc(PGP_Context *ctx, int disable); int pgp_set_sess_key(PGP_Context *ctx, int use); int pgp_set_compress_algo(PGP_Context *ctx, int algo); int pgp_set_compress_level(PGP_Context *ctx, int level); int pgp_set_text_mode(PGP_Context *ctx, int mode); int pgp_set_unicode_mode(PGP_Context *ctx, int mode); int pgp_get_unicode_mode(PGP_Context *ctx);
int pgp_set_symkey(PGP_Context *ctx, const uint8 *key, int len); int pgp_set_pubkey(PGP_Context *ctx, MBuf *keypkt, const uint8 *key, int key_len, int pubtype);
int pgp_get_keyid(MBuf *pgp_data, char *dst);
/* internal functions */
int pgp_load_digest(int code, PX_MD **res); int pgp_load_cipher(int code, PX_Cipher **res); int pgp_get_cipher_key_size(int code); int pgp_get_cipher_block_size(int code);
int pgp_s2k_fill(PGP_S2K *s2k, int mode, int digest_algo, int count); int pgp_s2k_read(PullFilter *src, PGP_S2K *s2k); int pgp_s2k_process(PGP_S2K *s2k, int cipher, const uint8 *key, int key_len);
typedefstruct PGP_CFB PGP_CFB; int pgp_cfb_create(PGP_CFB **ctx_p, int algo, const uint8 *key, int key_len, int resync, uint8 *iv); void pgp_cfb_free(PGP_CFB *ctx); int pgp_cfb_encrypt(PGP_CFB *ctx, const uint8 *data, int len, uint8 *dst); int pgp_cfb_decrypt(PGP_CFB *ctx, const uint8 *data, int len, uint8 *dst);
void pgp_armor_encode(const uint8 *src, unsigned len, StringInfo dst, int num_headers, char **keys, char **values); int pgp_armor_decode(const uint8 *src, int len, StringInfo dst); int pgp_extract_armor_headers(const uint8 *src, unsigned len, int *nheaders, char ***keys, char ***values);
int pgp_compress_filter(PushFilter **res, PGP_Context *ctx, PushFilter *dst); int pgp_decompress_filter(PullFilter **res, PGP_Context *ctx, PullFilter *src);
int pgp_key_alloc(PGP_PubKey **pk_p); void pgp_key_free(PGP_PubKey *pk); int _pgp_read_public_key(PullFilter *pkt, PGP_PubKey **pk_p);
int pgp_parse_pubenc_sesskey(PGP_Context *ctx, PullFilter *pkt); int pgp_create_pkt_reader(PullFilter **pf_p, PullFilter *src, int len, int pkttype, PGP_Context *ctx); int pgp_parse_pkt_hdr(PullFilter *src, uint8 *tag, int *len_p, int allow_ctx);
int pgp_skip_packet(PullFilter *pkt); int pgp_expect_packet_end(PullFilter *pkt);
int pgp_write_pubenc_sesskey(PGP_Context *ctx, PushFilter *dst); int pgp_create_pkt_writer(PushFilter *dst, int tag, PushFilter **res_p);
int pgp_mpi_alloc(int bits, PGP_MPI **mpi); int pgp_mpi_create(uint8 *data, int bits, PGP_MPI **mpi); int pgp_mpi_free(PGP_MPI *mpi); int pgp_mpi_read(PullFilter *src, PGP_MPI **mpi); int pgp_mpi_write(PushFilter *dst, PGP_MPI *n); int pgp_mpi_hash(PX_MD *md, PGP_MPI *n); unsigned pgp_mpi_cksum(unsigned cksum, PGP_MPI *n);
int pgp_elgamal_encrypt(PGP_PubKey *pk, PGP_MPI *_m,
PGP_MPI **c1_p, PGP_MPI **c2_p); int pgp_elgamal_decrypt(PGP_PubKey *pk, PGP_MPI *_c1, PGP_MPI *_c2,
PGP_MPI **msg_p); int pgp_rsa_encrypt(PGP_PubKey *pk, PGP_MPI *_m, PGP_MPI **c_p); int pgp_rsa_decrypt(PGP_PubKey *pk, PGP_MPI *_c, PGP_MPI **m_p);
externstruct PullFilterOps pgp_decrypt_filter;
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.14 Sekunden
(vorverarbeitet am 2026-08-08)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.