{ 0 }
};
+static PyObject *gmget_name(PyObject *me, void *hunoz)
+ { return (TEXT_FROMSTR(GMAC_M(me)->ops->c->name)); }
+
+static PyObject *gmget_hashsz(PyObject *me, void *hunoz)
+ { return (PyInt_FromLong(GMAC_M(me)->ops->c->hashsz)); }
+#define gmget_tagsz gmget_hashsz
+
+static const PyGetSetDef gmac_pygetset[] = {
+#define GETSETNAME(op, name) gm##op##_##name
+ GET (hashsz, "M.hashsz -> MAC output size")
+ GET (tagsz, "M.tagsz -> MAC output size")
+ GET (name, "M.name -> name of this kind of MAC")
+#undef GETSETNAME
+ { 0 }
+};
+
static const PyTypeObject gcmac_pytype_skel = {
PyVarObject_HEAD_INIT(0, 0) /* Header */
"GCMAC", /* @tp_name@ */
0, /* @tp_iternext@ */
0, /* @tp_methods@ */
0, /* @tp_members@ */
- 0, /* @tp_getset@ */
+ PYGETSET(gmac), /* @tp_getset@ */
0, /* @tp_base@ */
0, /* @tp_dict@ */
0, /* @tp_descr_get@ */
{ 0 }
};
+static PyObject *poly1305get_name(PyObject *me, void *hunoz)
+ { RETURN_OBJ(((PyHeapTypeObject *)poly1305key_pytype)->ht_name); }
+
+static PyObject *poly1305get_tagsz(PyObject *me, void *hunoz)
+ { return (PyInt_FromLong(16)); }
+
+static const PyGetSetDef poly1305_pygetset[] = {
+#define GETSETNAME(op, name) poly1305##op##_##name
+ GET (tagsz, "PK.tagsz -> MAC output size")
+ GET (name, "PK.name -> name of this kind of MAC")
+#undef GETSETNAME
+ { 0 }
+};
+
static const PyMethodDef poly1305hash_pymethods[] = {
#define METHNAME(name) polymeth_##name
NAMETH(copy, "P.copy() -> PP")
0, /* @tp_iternext@ */
0, /* @tp_methods@ */
0, /* @tp_members@ */
- 0, /* @tp_getset@ */
+ PYGETSET(poly1305), /* @tp_getset@ */
0, /* @tp_base@ */
0, /* @tp_dict@ */
0, /* @tp_descr_get@ */