5 static PyObject *scrypt_getpowhash(PyObject *self, PyObject *args)
10 if (!PyArg_ParseTuple(args, "S", &input))
13 output = PyMem_Malloc(32);
15 scrypt_1024_1_1_256((char *)PyString_AsString((PyObject*) input), output);
17 value = Py_BuildValue("s#", output, 32);
22 static PyMethodDef ScryptMethods[] = {
23 { "getPoWHash", scrypt_getpowhash, METH_VARARGS, "Returns the proof of work hash using scrypt" },
24 { NULL, NULL, 0, NULL }
27 PyMODINIT_FUNC initltc_scrypt(void) {
28 (void) Py_InitModule("ltc_scrypt", ScryptMethods);