2 * keyid.h - Routines to calculate key IDs.
4 * Jonathan McDowell <noodles@earth.li>
6 * Copyright 2002 Project Purple
12 // #include <stdint.h>
15 #include "keystructs.h"
18 * get_keyid - Given a public key returns the keyid.
19 * @publickey: The key to calculate the id for.
21 * This function returns the key id for a given public key.
23 uint64_t get_keyid(struct openpgp_publickey *publickey);
26 * get_fingerprint - Given a public key returns the fingerprint.
27 * @publickey: The key to calculate the id for.
28 * @fingerprint: The fingerprint (must be at least 20 bytes of space).
29 * @len: The length of the returned fingerprint.
31 * This function returns the fingerprint for a given public key. As Type 3
32 * fingerprints are 16 bytes and Type 4 are 20 the len field indicates
33 * which we've returned.
35 unsigned char *get_fingerprint(struct openpgp_packet *packet,
36 unsigned char *fingerprint,
40 * get_packetid - Given a PGP packet returns the keyid.
41 * @packet: The packet to calculate the id for.
43 * This function returns the key id for a given PGP packet.
45 uint64_t get_packetid(struct openpgp_packet *packet);
47 #endif /* __KEYID_H__ */