-int encrypt(void *pt, int ptlen, void *key, int keylen, void *ct, int *ctlen)
+static int which = 0;
+
+int select_crypto_if(int ifno)
+{
+ if (ifno < 0 || ifno > MAX_IF) return -1;
+ which = ifno;
+ return 0;
+}
+
+const char *crypto_init(int ifno)
+{
+ if (ifno < 0 || ifno > MAX_IF) return (const char *)0;
+ return ifs[ifno]->init();
+}
+
+static unsigned char iv[16] = {0};
+
+unsigned long encrypt(void *key, int keylen, void *pt, void *ct, int tlen)