Py_ssize_t sz;
if (!PyArg_ParseTuple(arg, "s#:setiv", &p, &sz)) goto end;
+ if (!GCIPHER_C(me)->ops->setiv) VALERR("`setiv' not supported");
if (!GC_CLASS(GCIPHER_C(me))->blksz) VALERR("not a block cipher mode");
if (sz != GC_CLASS(GCIPHER_C(me))->blksz) VALERR("bad IV length");
GC_SETIV(GCIPHER_C(me), p);
static PyObject *gcmeth_bdry(PyObject *me, PyObject *arg)
{
if (!PyArg_ParseTuple(arg, ":bdry")) goto end;
+ if (!GCIPHER_C(me)->ops->bdry) VALERR("`bdry' not supported");
if (!GC_CLASS(GCIPHER_C(me))->blksz) VALERR("not a block cipher mode");
GC_BDRY(GCIPHER_C(me));
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;
#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