X-Git-Url: http://www.average.org/gitweb/?p=pam_pcsc_cr.git;a=blobdiff_plain;f=crypto.h;h=441202d1673d6b5724baef814b21730e4cda2ff9;hp=8eaf939e5f5b022dcbe352332099b35c9bfde4e0;hb=4a5da38dfd8b0236564ffe6b70eab1eeb399fff0;hpb=f0b0ce450776d2b8501aa48509191215800e820e diff --git a/crypto.h b/crypto.h index 8eaf939..441202d 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(const int ifno); +const char *crypto_init(const int ifno); +unsigned long encrypt(const void *key, const int keylen, const void *pt, void *ct, const int tlen); +unsigned long decrypt(const void *key, const int keylen, const void *ct, void *pt, const int tlen); +unsigned long hash(const void *pt, const int tlen, void *tag, int *taglen); +unsigned long hmac(const void *key, const int keylen, const void *pt, const int tlen, + void *tag, int *taglen); +const char *crypto_errstr(const unsigned long err); + +#define HASHSIZE 20 +#define CBLKSIZE 16 #endif