X-Git-Url: http://git.silcnet.org/gitweb/?p=crypto.git;a=blobdiff_plain;f=lib%2Fsilcpgp%2Fsilcpgp_i.h;fp=lib%2Fsilcpgp%2Fsilcpgp_i.h;h=7c9539327b537905aa1dd17b7210205b3cba0854;hp=0000000000000000000000000000000000000000;hb=1b4e874f9401653b659a6adec2d2f046f9331586;hpb=7d4fb45c07b67b027b549f46c3689e44e81b3586 diff --git a/lib/silcpgp/silcpgp_i.h b/lib/silcpgp/silcpgp_i.h new file mode 100644 index 00000000..7c953932 --- /dev/null +++ b/lib/silcpgp/silcpgp_i.h @@ -0,0 +1,52 @@ +/* + + silcpgp_i.h + + Author: Pekka Riikonen + + Copyright (C) 2007 - 2008 Pekka Riikonen + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + +*/ + +#ifndef SILCPGP_I_H +#define SILCPGP_I_H + +#ifndef SILCPGP_H +#error "Do not include this header directly" +#endif + +/* OpenPGP packet. Contains the raw data and packet tag. */ +struct SilcPGPPacketStruct { + struct SilcPGPPacketStruct *next; + SilcBufferStruct data; + SilcUInt8 tag; +}; + +/* Armoring headers */ +#define SILC_PGP_ARMOR_MESSAGE "BEGIN PGP MESSAGE" +#define SILC_PGP_ARMOR_PUBKEY "BEGIN PGP PUBLIC KEY BLOCK" +#define SILC_PGP_ARMOR_PRIVKEY "BEGIN PGP PRIVATE KEY BLOCK" +#define SILC_PGP_ARMOR_SIGNATURE "BEGIN PGP SIGNATURE" + +SilcPGPPacket silc_pgp_packet_copy(SilcPGPPacket packet); +SilcCipher silc_pgp_cipher_alloc(SilcPGPCipher cipher); +int silc_pgp_packet_public_key_decode(unsigned char *key, SilcUInt32 key_len, + SilcPGPPublicKey pubkey); +int silc_pgp_packet_private_key_decode(unsigned char *key, SilcUInt32 key_len, + const char *passphrase, + SilcUInt32 passphrase_len, + SilcPGPPrivateKey privkey); +#ifdef SILC_DEBUG +const char *silc_pgp_packet_name(SilcPGPPacketTag tag); +#endif /* SILC_DEBUG */ + +#endif /* SILCPGP_I_H */