From: Mark Wooding Date: Sun, 13 Oct 2019 23:59:30 +0000 (+0100) Subject: algorithms.c (hLATIN_prf): Allow all supported sizes of key. X-Git-Url: https://git.distorted.org.uk/~mdw/catacomb-python/commitdiff_plain/0b7c311ac2e668535918095626a7f5b0e5aae04a algorithms.c (hLATIN_prf): Allow all supported sizes of key. --- 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); \