51 broke -E logic completely, rewise it
[tfcrypt.git] / tfc_misc.c
index 5a6c53b213510b0cbc3867bfe8c5f001cb273066..2aa58df4b5fd46ea9d579f3be3e4cafb85067e0f 100644 (file)
@@ -97,11 +97,23 @@ const char *tfc_modename(int mode)
                case TFC_MODE_XTS: return "XTS";
                case TFC_MODE_ECB: return "ECB";
                case TFC_MODE_CBC: return "CBC";
+               case TFC_MODE_PCBC: return "PCBC";
        }
 
        return NULL;
 }
 
+tfc_yesno tfc_is_freestream(int mode)
+{
+       switch (mode) {
+               case TFC_MODE_PLAIN:
+               case TFC_MODE_XOR:
+               case TFC_MODE_STREAM: return YES;
+       }
+
+       return NO;
+}
+
 void tfc_getcurtime(tfc_useconds *tx)
 {
        struct timespec t;