keys: provide key type and length

Save the type and length of each key and add a function to get this
information.
This commit is contained in:
Miroslav Lichvar
2020-05-13 13:45:03 +02:00
parent 11a5c7337a
commit f4ed2abdca
3 changed files with 32 additions and 10 deletions

1
keys.h
View File

@@ -38,6 +38,7 @@ extern int KEY_KeyKnown(uint32_t key_id);
extern int KEY_GetAuthDelay(uint32_t key_id);
extern int KEY_GetAuthLength(uint32_t key_id);
extern int KEY_CheckKeyLength(uint32_t key_id);
extern int KEY_GetKeyInfo(uint32_t key_id, int *type, int *bits);
extern int KEY_GenerateAuth(uint32_t key_id, const unsigned char *data,
int data_len, unsigned char *auth, int auth_len);