-// HMAC_CTX hctx;
-// HMAC_CTX_init(&hctx);
-// if (HMAC_Init(&hctx, key, keylen, EVP_sha1())) success;
-// if (HMAC_Update(&hctx, data, datalen)) success;
-// if (HMAC_Final(&hctx, &digest, &digestlen)) success
-// HMAC_CTX_cleanup(&hctx);
+ assert(keylen == 16);
+ return ifs[which]->decrypt(key, keylen, iv, ct, pt, tlen);
+}
+
+unsigned long hash(void *pt, int tlen, void *tag, int *taglen)
+{
+ assert(*taglen == 20);
+ return ifs[which]->hash(pt, tlen, tag, taglen);
+}
+
+unsigned long hmac(void *key, int keylen, void *pt, int tlen, void *tag, int *taglen)
+{
+ assert(*taglen == 20);
+ return ifs[which]->hmac(key, keylen, pt, tlen, tag, taglen);
+}
+
+const char *crypto_errstr(unsigned long err)
+{
+ return ifs[which]->errstr(err);
+}