]> www.average.org Git - pam_pcsc_cr.git/blob - crypto.h
PAM module works
[pam_pcsc_cr.git] / crypto.h
1 #ifndef _CRYPTO_H
2 #define _CRYPTO_H
3
4 int select_crypto_if(const int ifno);
5 const char *crypto_init(const int ifno);
6 unsigned long encrypt(const void *key, const int keylen, const void *pt, void *ct, const int tlen);
7 unsigned long decrypt(const void *key, const int keylen, const void *ct, void *pt, const int tlen);
8 unsigned long hash(const void *pt, const int tlen, void *tag, int *taglen);
9 unsigned long hmac(const void *key, const int keylen, const void *pt, const int tlen,
10                         void *tag, int *taglen);
11 const char *crypto_errstr(const unsigned long err);
12
13 #define HASHSIZE 20
14 #define CBLKSIZE 16
15
16 #endif