chiark
/
gitweb
/
~mdw
/
catacomb-python
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
algorithms.c: Add binding for `poly1305_flushzero'.
[catacomb-python]
/
algorithms.c
diff --git
a/algorithms.c
b/algorithms.c
index 2dc2dda0673f757af5361f7621962fd78f3b32ae..cb594ca31dd604f8297ea964b9457390f52ca89d 100644
(file)
--- a/
algorithms.c
+++ b/
algorithms.c
@@
-1335,6
+1335,13
@@
static PyObject *polymeth_flush(PyObject *me, PyObject *arg)
RETURN_ME;
}
RETURN_ME;
}
+static PyObject *polymeth_flushzero(PyObject *me, PyObject *arg)
+{
+ if (!PyArg_ParseTuple(arg, ":flushzero")) return (0);
+ poly1305_flushzero(P1305_CTX(me));
+ RETURN_ME;
+}
+
static PyObject *polymeth_concat(PyObject *me, PyObject *arg)
{
PyObject *pre, *suff;
static PyObject *polymeth_concat(PyObject *me, PyObject *arg)
{
PyObject *pre, *suff;
@@
-1385,6
+1392,7
@@
static PyMethodDef poly1305hash_pymethods[] = {
#undef METHBUF_
METH (hashstrz, "P.hashstrz(STRING)")
METH (flush, "P.flush()")
#undef METHBUF_
METH (hashstrz, "P.hashstrz(STRING)")
METH (flush, "P.flush()")
+ METH (flushzero, "P.flushzero()")
METH (concat, "P.concat(PREFIX, SUFFIX)")
METH (done, "P.done() -> TAG")
#undef METHNAME
METH (concat, "P.concat(PREFIX, SUFFIX)")
METH (done, "P.done() -> TAG")
#undef METHNAME