summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
bfb450c)
Hash the input number or length, not the size of the field.
uint##n x; \
octet b[SZ_##W]; \
if (!PyArg_ParseTuple(arg, "O&:hashu" #w, convu##n, &x)) goto end; \
uint##n x; \
octet b[SZ_##W]; \
if (!PyArg_ParseTuple(arg, "O&:hashu" #w, convu##n, &x)) goto end; \
- STORE##W(b, n); poly1305_hash(P1305_CTX(me), b, sizeof(b)); \
+ STORE##W(b, x); poly1305_hash(P1305_CTX(me), b, sizeof(b)); \
RETURN_ME; \
end: \
return (0); \
RETURN_ME; \
end: \
return (0); \
octet b[SZ_##W]; \
if (!PyArg_ParseTuple(arg, "s#:hashbuf" #w, &p, &sz)) goto end; \
if (sz > MASK##n) TYERR("string too long"); \
octet b[SZ_##W]; \
if (!PyArg_ParseTuple(arg, "s#:hashbuf" #w, &p, &sz)) goto end; \
if (sz > MASK##n) TYERR("string too long"); \
- STORE##W(b, n); poly1305_hash(P1305_CTX(me), b, sizeof(b)); \
+ STORE##W(b, sz); poly1305_hash(P1305_CTX(me), b, sizeof(b)); \
poly1305_hash(P1305_CTX(me), p, sz); \
RETURN_ME; \
end: \
poly1305_hash(P1305_CTX(me), p, sz); \
RETURN_ME; \
end: \