X-Git-Url: http://www.average.org/gitweb/?p=pam_pcsc_cr.git;a=blobdiff_plain;f=crypto.h;h=441202d1673d6b5724baef814b21730e4cda2ff9;hp=c24cce07a76f7a6d910d675baeccff6b49bcc2ed;hb=7b6aa201f4bd4aaf7f7a83677f7fd6f316dde07e;hpb=724570ad4aaaa5eb67fe0e808d638321d522eba7 diff --git a/crypto.h b/crypto.h index c24cce0..441202d 100644 --- a/crypto.h +++ b/crypto.h @@ -1,13 +1,16 @@ #ifndef _CRYPTO_H #define _CRYPTO_H -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, +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(unsigned long err); +const char *crypto_errstr(const unsigned long err); + +#define HASHSIZE 20 +#define CBLKSIZE 16 #endif