2 * keyid.h - Routines to calculate key IDs.
4 * Jonathan McDowell <noodles@earth.li>
6 * Copyright 2002 Project Purple
8 * $Id: keyid.h,v 1.5 2003/06/07 13:45:34 noodles Exp $
16 #include "keystructs.h"
19 * get_keyid - Given a public key returns the keyid.
20 * @publickey: The key to calculate the id for.
22 * This function returns the key id for a given public key.
24 uint64_t get_keyid(struct openpgp_publickey *publickey);
27 * get_fingerprint - Given a public key returns the fingerprint.
28 * @publickey: The key to calculate the id for.
29 * @fingerprint: The fingerprint (must be at least 20 bytes of space).
30 * @len: The length of the returned fingerprint.
32 * This function returns the fingerprint for a given public key. As Type 3
33 * fingerprints are 16 bytes and Type 4 are 20 the len field indicates
34 * which we've returned.
36 unsigned char *get_fingerprint(struct openpgp_packet *packet,
37 unsigned char *fingerprint,
41 * get_packetid - Given a PGP packet returns the keyid.
42 * @packet: The packet to calculate the id for.
44 * This function returns the key id for a given PGP packet.
46 uint64_t get_packetid(struct openpgp_packet *packet);
48 #endif /* __KEYID_H__ */