pylibswarm

Python3 wrapper for libswarm-ng
git clone git://git.defalsify.org/pylibswarm.git
Log | Files | Refs | Submodules | README | LICENSE

commit 1a6abf739e6d6971bfc318d1944ff09e426325aa
parent 79508bafa85d206bb0989d0a869c9ff40c2abbfd
Author: nolash <dev@holbrook.no>
Date:   Mon, 13 Sep 2021 20:33:23 +0200

Remove hardcoded arg in test

Diffstat:
Msrc/python_swarm.c | 3+--
Mtest.py | 2+-
2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/python_swarm.c b/src/python_swarm.c @@ -16,8 +16,7 @@ static PyObject* method_bmt(PyObject *self, PyObject *args) { if (r != 1) { return NULL; } - int foo = 0; - bmt_init(&bmt_content, (char*)input, (size_t)foo, data_length); + bmt_init(&bmt_content, (char*)input, input_length, data_length); bmt_sum(&bmt_content); //return PyLong_FromLong(0); return Py_BuildValue("y", &bmt_content.buf); diff --git a/test.py b/test.py @@ -3,4 +3,4 @@ import swarm print('swaaarm {}'.format(swarm)) b = swarm.bmt(b'foo', 3, 3) -print('%x', b[:32]) +print('{}'.format(b[:32].hex()))