diff options
Diffstat (limited to 'src/block_template.c')
-rw-r--r-- | src/block_template.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/block_template.c b/src/block_template.c index bc7aa74..c36b316 100644 --- a/src/block_template.c +++ b/src/block_template.c @@ -170,7 +170,7 @@ ALGnew(PyObject *self, PyObject *args, PyObject *kwdict) "Key cannot be the null string"); return NULL; } - if (IVlen != BLOCK_SIZE && IVlen != 0) + if (IVlen != BLOCK_SIZE && mode != MODE_ECB && mode != MODE_CTR) { PyErr_Format(PyExc_ValueError, "IV must be %i bytes long", BLOCK_SIZE); |