From 0b7c311ac2e668535918095626a7f5b0e5aae04a Mon Sep 17 00:00:00 2001 From: Mark Wooding Date: Mon, 14 Oct 2019 00:59:30 +0100 Subject: [PATCH] algorithms.c (hLATIN_prf): Allow all supported sizes of key. --- algorithms.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/algorithms.c b/algorithms.c index 3d79c03..dcfb22d 100644 --- a/algorithms.c +++ b/algorithms.c @@ -1568,7 +1568,7 @@ static PyTypeObject poly1305hash_pytype_skel = { if (!PyArg_ParseTuple(arg, "s#s#:" #hdance "_prf", \ &k, &ksz, &n, &nsz)) \ goto end; \ - if (ksz != DANCE##_KEYSZ) VALERR("bad key length"); \ + if (ksz != keysz(ksz, dance##_keysz)) VALERR("bad key length"); \ if (nsz != HDANCE##_INSZ) VALERR("bad input length"); \ rc = bytestring_pywrap(0, HSALSA20_OUTSZ); \ dance##_init(&dance, k, ksz, 0); \ -- 2.11.0