projects
/
tfcrypt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
-g, -j: shortcuts for stream ciphers with random counter
[tfcrypt.git]
/
tfc_misc.c
diff --git
a/tfc_misc.c
b/tfc_misc.c
index 5a6c53b213510b0cbc3867bfe8c5f001cb273066..2aa58df4b5fd46ea9d579f3be3e4cafb85067e0f 100644
(file)
--- a/
tfc_misc.c
+++ b/
tfc_misc.c
@@
-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_XTS: return "XTS";
case TFC_MODE_ECB: return "ECB";
case TFC_MODE_CBC: return "CBC";
+ case TFC_MODE_PCBC: return "PCBC";
}
return NULL;
}
}
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;
void tfc_getcurtime(tfc_useconds *tx)
{
struct timespec t;