Damien Miller | 450a7a1 | 2000-03-26 13:04:51 +1000 | [diff] [blame] | 1 | #ifndef KEY_H |
| 2 | #define KEY_H |
| 3 | |
| 4 | typedef struct Key Key; |
| 5 | enum types { |
| 6 | KEY_RSA, |
| 7 | KEY_DSA, |
| 8 | KEY_EMPTY |
| 9 | }; |
| 10 | struct Key { |
| 11 | int type; |
| 12 | RSA *rsa; |
| 13 | DSA *dsa; |
| 14 | }; |
| 15 | |
| 16 | Key *key_new(int type); |
| 17 | void key_free(Key *k); |
| 18 | int key_equal(Key *a, Key *b); |
| 19 | char *key_fingerprint(Key *k); |
Damien Miller | e247cc4 | 2000-05-07 12:03:14 +1000 | [diff] [blame] | 20 | char *key_type(Key *k); |
Damien Miller | 450a7a1 | 2000-03-26 13:04:51 +1000 | [diff] [blame] | 21 | int key_write(Key *key, FILE *f); |
Damien Miller | eba71ba | 2000-04-29 23:57:08 +1000 | [diff] [blame] | 22 | unsigned int |
| 23 | key_read(Key *key, char **cpp); |
Damien Miller | 450a7a1 | 2000-03-26 13:04:51 +1000 | [diff] [blame] | 24 | |
| 25 | #endif |