]> www.average.org Git - pam_pcsc_cr.git/blobdiff - crypto_if.h
eprint don't need \n in the format
[pam_pcsc_cr.git] / crypto_if.h
index 488a0e6730ab8acc09af3d35d96d65b211ba3a9f..2fb4519cba6971e956639f5284f7f0b6209247ff 100644 (file)
@@ -2,14 +2,15 @@
 #define _CRYPTO_IF_H
 
 struct crypto_interface {
 #define _CRYPTO_IF_H
 
 struct crypto_interface {
-       char *name;
-       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 *ct, int ctlen, void *key, int keylen,
-                       void *tag, int *taglen);
+       const char *(*init)(void);
+       unsigned long (*encrypt)(void *key, int keylen, void *iv,
+                               void *pt, void *ct, int tlen);
+       unsigned long (*decrypt)(void *key, int keylen, void *iv,
+                               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 *(*errstr)(unsigned long err);
 };
 
 #endif
 };
 
 #endif