blob: ed3f770b8be91205c55a7761ef4ff06014f0537b [file] [log] [blame]
Damien Miller450a7a12000-03-26 13:04:51 +10001#ifndef KEY_H
2#define KEY_H
3
4typedef struct Key Key;
5enum types {
6 KEY_RSA,
7 KEY_DSA,
8 KEY_EMPTY
9};
10struct Key {
11 int type;
12 RSA *rsa;
13 DSA *dsa;
14};
15
16Key *key_new(int type);
17void key_free(Key *k);
18int key_equal(Key *a, Key *b);
19char *key_fingerprint(Key *k);
Damien Millere247cc42000-05-07 12:03:14 +100020char *key_type(Key *k);
Damien Miller450a7a12000-03-26 13:04:51 +100021int key_write(Key *key, FILE *f);
Damien Millereba71ba2000-04-29 23:57:08 +100022unsigned int
23key_read(Key *key, char **cpp);
Damien Miller450a7a12000-03-26 13:04:51 +100024
25#endif