From ba46e8640f1964f3e747674064ac9ed19ca8e640 Mon Sep 17 00:00:00 2001 From: Legrandin Date: Mon, 4 Feb 2013 00:11:45 +0100 Subject: Clarify message about incorrect length in the counter block. When the counter function returns an incorrect counter block to the cipher in CTR mode, the error message includes both the required and the provided amount of data (in bytes). --- src/block_template.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/block_template.c b/src/block_template.c index 964a6f3..f146b43 100644 --- a/src/block_template.c +++ b/src/block_template.c @@ -422,8 +422,8 @@ ALG_Encrypt(ALGobject *self, PyObject *args) Py_BLOCK_THREADS; PyErr_Format(PyExc_TypeError, "CTR counter function returned " - "string not of length %i", - BLOCK_SIZE); + "string of length %i, not %i", + ctr->buf_size, BLOCK_SIZE); free(buffer); return NULL; } -- cgit v1.2.1