-// 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(const void *pt, const int tlen, void *tag, int *taglen)
+{
+ assert(*taglen == 20);
+ return ifs[which]->hash(pt, tlen, tag, taglen);
+}
+
+unsigned long hmac(const void *key, const int keylen, const void *pt, const int tlen, void *tag, int *taglen)
+{
+ assert(*taglen == 20);
+ return ifs[which]->hmac(key, keylen, pt, tlen, tag, taglen);
+}
+
+const char *crypto_errstr(const unsigned long err)
+{
+ return ifs[which]->errstr(err);
+}