5 Author: Pekka Riikonen <priikone@silcnet.org>
7 Copyright (C) 2007 - 2008 Pekka Riikonen
9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; version 2 of the License.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
24 #error "Do not include this header directly"
27 /* OpenPGP packet. Contains the raw data and packet tag. */
28 struct SilcPGPPacketStruct {
29 struct SilcPGPPacketStruct *next;
30 SilcBufferStruct data;
34 /* Armoring headers */
35 #define SILC_PGP_ARMOR_MESSAGE "BEGIN PGP MESSAGE"
36 #define SILC_PGP_ARMOR_PUBKEY "BEGIN PGP PUBLIC KEY BLOCK"
37 #define SILC_PGP_ARMOR_PRIVKEY "BEGIN PGP PRIVATE KEY BLOCK"
38 #define SILC_PGP_ARMOR_SIGNATURE "BEGIN PGP SIGNATURE"
40 SilcPGPPacket silc_pgp_packet_copy(SilcPGPPacket packet);
41 SilcCipher silc_pgp_cipher_alloc(SilcPGPCipher cipher);
42 int silc_pgp_packet_public_key_decode(unsigned char *key, SilcUInt32 key_len,
43 SilcPGPPublicKey pubkey);
44 int silc_pgp_packet_private_key_decode(unsigned char *key, SilcUInt32 key_len,
45 const char *passphrase,
46 SilcUInt32 passphrase_len,
47 SilcPGPPrivateKey privkey);
49 const char *silc_pgp_packet_name(SilcPGPPacketTag tag);
50 #endif /* SILC_DEBUG */
52 #endif /* SILCPGP_I_H */