return NULL;
}
+tfc_yesno tfc_is_stream(int mode)
+{
+ switch (mode) {
+ case TFC_MODE_PLAIN:
+ case TFC_MODE_CTR:
+ case TFC_MODE_STREAM: return YES;
+ }
+
+ return NO;
+}
+
void tfc_getcurtime(tfc_useconds *tx)
{
struct timespec t;
"%s: invalid block size value", s);
}
else blksize = (size_t)tfc_modifysize((tfc_fsize)blksize, strchr(s, ':'));
- if (do_edcrypt != TFC_DO_PLAIN && blksize < TF_BLOCK_SIZE) xerror(NO, YES, YES,
+ if (!tfc_is_stream(ctr_mode) && blksize < TF_BLOCK_SIZE) xerror(NO, YES, YES,
"%s: block size is lesser than TF_BLOCK_SIZE (%u bytes)", s, TFC_U(TF_BLOCK_SIZE));
if (blksize > TFC_BLKSIZE) xerror(NO, YES, YES,
"%s: block size exceeds %u bytes",
int xopen(const char *pathname, int flags);
void xclose(int fd);
const char *tfc_modename(int mode);
+tfc_yesno tfc_is_stream(int mode);
void tfc_getcurtime(tfc_useconds *tx);
char *tfc_format_time(tfc_useconds t);
char *tfc_format_pid(const char *str);