5 static PyObject *scrypt_getpowhash(PyObject *self, PyObject *args)
8 if (!PyArg_ParseTuple(args, "S", &input))
11 uint8_t *output = PyMem_Malloc(32);
12 scrypt_1024_1_1_256((uint8_t *)PyString_AsString((PyObject*) input), output);
14 PyObject *value = Py_BuildValue("s#", output, 32);
19 static PyMethodDef ScryptMethods[] = {
20 { "getPoWHash", scrypt_getpowhash, METH_VARARGS, "Returns the proof of work hash using scrypt" },
21 { NULL, NULL, 0, NULL }
24 PyMODINIT_FUNC initltc_scrypt(void) {
25 (void) Py_InitModule("ltc_scrypt", ScryptMethods);