if (!PyArg_ParseTupleAndKeywords(arg, kw, "i|iii:new", kwlist,
&dfl, &min, &max, &mod))
goto end;
- if (dfl < 0 || min < 0 || max < 0)
- VALERR("key size cannot be negative");
- if (min > dfl || (max && dfl > max))
- VALERR("bad key size bounds");
- if (mod <= 0 || dfl % mod || min % mod || max % mod)
+ if (dfl < 0 || min < 0) VALERR("key size cannot be negative");
+ if (min > dfl || (max && dfl > max)) VALERR("bad key size bounds");
+ if (mod <= 0 || dfl%mod || min%mod || max%mod)
VALERR("bad key size modulus");
o = (keyszrange_pyobj *)ty->tp_alloc(ty, 0);
o->dfl = dfl;
PyObject *x = 0, *l = 0;
keyszset_pyobj *o = 0;
- if (!PyArg_ParseTupleAndKeywords(arg, kw, "i|O:new", kwlist,
- &dfl, &set))
+ if (!PyArg_ParseTupleAndKeywords(arg, kw, "i|O:new", kwlist, &dfl, &set))
goto end;
if (!set) set = PyTuple_New(0);
else Py_INCREF(set);
Py_TPFLAGS_BASETYPE,
/* @tp_doc@ */
-"Key size constraints.",
+"Key size constraints. Abstract.",
0, /* @tp_traverse@ */
0, /* @tp_clear@ */
Py_TPFLAGS_BASETYPE,
/* @tp_doc@ */
-"Key size constraints. This object imposes no constraints on size.",
+"KeySZAny(DEFAULT)\n\
+ Key size constraints. This object imposes no constraints on size.",
0, /* @tp_traverse@ */
0, /* @tp_clear@ */
Py_TPFLAGS_BASETYPE,
/* @tp_doc@ */
-"Key size constraints. This object asserts minimum and maximum (if\n\
-sizes, and requires the key length to be a multiple of some value.",
+"KeySZRange(DEFAULT, [min = 0], [max = 0], [mod = 1])\n\
+ Key size constraints. Key size must be between MIN and MAX inclusive,\n\
+ and be a multiple of MOD.",
0, /* @tp_traverse@ */
0, /* @tp_clear@ */
Py_TPFLAGS_BASETYPE,
/* @tp_doc@ */
-"Key size constraints. This object requires the key to be one of a\n\
-few listed sizes.",
+"KeySZSet(DEFAULT, SEQ)\n\
+ Key size constraints. Key size must be DEFAULT or one in SEQ.",
0, /* @tp_traverse@ */
0, /* @tp_clear@ */
Py_TPFLAGS_BASETYPE,
/* @tp_doc@ */
-"Poly1305 key.",
+"poly1305(K): Poly1305 key.",
0, /* @tp_traverse@ */
0, /* @tp_clear@ */
Py_TPFLAGS_BASETYPE,
/* @tp_doc@ */
-"Keccak-p[1600, n] state.",
+"Keccak1600([nround = 24]): Keccak-p[1600, n] state.",
0, /* @tp_traverse@ */
0, /* @tp_clear@ */
Py_TPFLAGS_BASETYPE,
/* @tp_doc@ */
-"SHAKE128/cSHAKE128 XOF.",
+"Shake128([perso = STR], [func = STR]): SHAKE128/cSHAKE128 XOF.",
0, /* @tp_traverse@ */
0, /* @tp_clear@ */
Py_TPFLAGS_BASETYPE,
/* @tp_doc@ */
-"SHAKE256/cSHAKE256 XOF.",
+"Shake256([perso = STR], [func = STR]): SHAKE256/cSHAKE256 XOF.",
0, /* @tp_traverse@ */
0, /* @tp_clear@ */