/* -*-c-*-
- *
- * $Id$
*
* Symmetric cryptography
*
* (c) 2004 Straylight/Edgeware
*/
-/*----- Licensing notice --------------------------------------------------*
+/*----- Licensing notice --------------------------------------------------*
*
* This file is part of the Python interface to Catacomb.
*
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
- *
+ *
* Catacomb/Python is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with Catacomb/Python; if not, write to the Free Software Foundation,
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
} break;
case KSZ_RANGE: {
keyszrange_pyobj *o =
- PyObject_New(keyszrange_pyobj, keyszrange_pytype);
+ PyObject_New(keyszrange_pyobj, keyszrange_pytype);
o->dfl = k[1];
o->min = k[2];
o->max = k[3];
} break;
case KSZ_SET: {
keyszset_pyobj *o =
- PyObject_New(keyszset_pyobj, keyszset_pytype);
+ PyObject_New(keyszset_pyobj, keyszset_pytype);
int i, n;
o->dfl = k[1];
for (i = 0; k[i + 1]; i++) ;
if (xx < 0) VALERR("key size cannot be negative");
PyList_Append(l, x);
Py_DECREF(x);
- x = 0;
+ x = 0;
}
Py_DECREF(set);
if ((set = PySequence_Tuple(l)) == 0) goto end;
g = PyObject_NEW(gcipher_pyobj, (PyTypeObject *)cobj);
g->c = c;
g->f = f;
- return ((PyObject *)g);
+ return ((PyObject *)g);
}
static PyObject *gcipher_pynew(PyTypeObject *ty, PyObject *arg, PyObject *kw)
GC_INIT(GCCIPHER_CC(ty), k, sz),
f_freeme));
end:
- return (0);
+ return (0);
}
PyObject *gccipher_pywrap(gccipher *cc)
goto end;
return (ghash_pywrap((PyObject *)ty, GH_INIT(GCHASH_CH(ty)), f_freeme));
end:
- return (0);
+ return (0);
}
PyObject *gchash_pywrap(gchash *ch)
g = PyObject_NEW(ghash_pyobj, (PyTypeObject *)cobj);
g->h = h;
g->f = f;
- return ((PyObject *)g);
+ return ((PyObject *)g);
}
static void ghash_pydealloc(PyObject *me)
GM_KEY(GCMAC_CM(ty), k, sz),
f_freeme));
end:
- return (0);
+ return (0);
}
static PyObject *gmhash_pynew(PyTypeObject *ty, PyObject *arg, PyObject *kw)
PyType_Ready(&g->ty.ht_type);
g->m = m;
g->f = f;
- return ((PyObject *)g);
+ return ((PyObject *)g);
}
static void gmac_pydealloc(PyObject *me)
#define PRP_ENTRY(PRE, pre) &pre##_prpinfo,
PRPS(PRP_ENTRY)
0
-};
+};
typedef struct gcprp_pyobj {
PyHeapTypeObject ty;
Py_INCREF(me);
return (me);
end:
- return (0);
+ return (0);
}
static void gprp_pydealloc(PyObject *me)