2000-03-26 07:07:24 +00:00
|
|
|
#ifndef KEY_H
|
|
|
|
#define KEY_H
|
|
|
|
|
|
|
|
typedef struct Key Key;
|
|
|
|
enum types {
|
|
|
|
KEY_RSA,
|
|
|
|
KEY_DSA,
|
|
|
|
KEY_EMPTY
|
|
|
|
};
|
|
|
|
struct Key {
|
|
|
|
int type;
|
|
|
|
RSA *rsa;
|
|
|
|
DSA *dsa;
|
|
|
|
};
|
|
|
|
|
|
|
|
Key *key_new(int type);
|
|
|
|
void key_free(Key *k);
|
|
|
|
int key_equal(Key *a, Key *b);
|
|
|
|
char *key_fingerprint(Key *k);
|
2000-05-15 04:37:24 +00:00
|
|
|
char *key_type(Key *k);
|
2000-03-26 07:07:24 +00:00
|
|
|
int key_write(Key *key, FILE *f);
|
2000-05-15 04:37:24 +00:00
|
|
|
unsigned int
|
|
|
|
key_read(Key *key, char **cpp);
|
2000-03-26 07:07:24 +00:00
|
|
|
|
|
|
|
#endif
|