X-Git-Url: http://www.average.org/gitweb/?p=pam_pcsc_cr.git;a=blobdiff_plain;f=crypto.h;h=ad4cf63d2e00cb577bea3171c6072346742edf31;hp=8eaf939e5f5b022dcbe352332099b35c9bfde4e0;hb=9b697bd4732dad5e1d105623f3a4480a1e6b79f0;hpb=f0b0ce450776d2b8501aa48509191215800e820e diff --git a/crypto.h b/crypto.h index 8eaf939..ad4cf63 100644 --- a/crypto.h +++ b/crypto.h @@ -1,9 +1,16 @@ #ifndef _CRYPTO_H #define _CRYPTO_H -int encrypt(void *pt, int ptlen, void *key, int keylen, void *ct, int *ctlen); -int decrypt(void *ct, int ctlen, void *key, int keylen, void *pt, int *ptlen); -int hash(void *pt, int ptlen, void *tag, int *taglen); -int hmac(void *pt, int ptlen, void *key, int keylen, void *tag, int *taglen); +int select_crypto_if(int ifno); +const char *crypto_init(int ifno); +unsigned long encrypt(void *key, int keylen, void *pt, void *ct, int tlen); +unsigned long decrypt(void *key, int keylen, void *ct, void *pt, int tlen); +unsigned long hash(void *pt, int tlen, void *tag, int *taglen); +unsigned long hmac(void *key, int keylen, void *pt, int tlen, + void *tag, int *taglen); +const char *crypto_errstr(unsigned long err); + +#define HASHSIZE 20 +#define CBLKSIZE 16 #endif