]> www.average.org Git - pam_pcsc_cr.git/blob - crypto_if.h
cleaner crypto init
[pam_pcsc_cr.git] / crypto_if.h
1 #ifndef _CRYPTO_IF_H
2 #define _CRYPTO_IF_H
3
4 struct crypto_interface {
5         const char *(*init)(void);
6         unsigned long (*encrypt)(void *key, int keylen, void *iv,
7                                 void *pt, void *ct, int tlen);
8         unsigned long (*decrypt)(void *key, int keylen, void *iv,
9                                 void *ct, void *pt, int tlen);
10         unsigned long (*hash)(void *pt, int tlen, void *tag, int *taglen);
11         unsigned long (*hmac)(void *key, int keylen,
12                                 void *pt, int tlen, void *tag, int *taglen);
13         const char *(*errstr)(unsigned long err);
14 };
15
16 #endif