SecureString-0.2/0000755000175000017500000000000013223415240013672 5ustar dnetdnet00000000000000SecureString-0.2/PKG-INFO0000644000175000017500000000053613223415240014773 0ustar dnetdnet00000000000000Metadata-Version: 1.0 Name: SecureString Version: 0.2 Summary: Clears the contents of strings containing cryptographic material Home-page: https://github.com/dnet/pysecstr Author: András Veres-Szentkirályi, Lawrence Fan Author-email: vsza@vsza.hu, fanl3@rpi.edu License: MIT Description-Content-Type: UNKNOWN Description: UNKNOWN Platform: UNKNOWN SecureString-0.2/setup.py0000644000175000017500000000102513124514721015406 0ustar dnetdnet00000000000000# -*- encoding: utf-8 -*- try: from setuptools import setup, Extension except ImportError: from distutils.core import setup, Extension setup( name='SecureString', version='0.2', description='Clears the contents of strings containing cryptographic material', author=u'András Veres-Szentkirályi, Lawrence Fan', author_email='vsza@vsza.hu, fanl3@rpi.edu', url='https://github.com/dnet/pysecstr', license='MIT', ext_modules=[Extension('SecureString', ['pysecstr.c'], libraries=['crypto'])], ) SecureString-0.2/setup.cfg0000644000175000017500000000004613223415240015513 0ustar dnetdnet00000000000000[egg_info] tag_build = tag_date = 0 SecureString-0.2/SecureString.egg-info/0000755000175000017500000000000013223415240020001 5ustar dnetdnet00000000000000SecureString-0.2/SecureString.egg-info/top_level.txt0000644000175000017500000000001513223415237022535 0ustar dnetdnet00000000000000SecureString SecureString-0.2/SecureString.egg-info/PKG-INFO0000644000175000017500000000053613223415237021110 0ustar dnetdnet00000000000000Metadata-Version: 1.0 Name: SecureString Version: 0.2 Summary: Clears the contents of strings containing cryptographic material Home-page: https://github.com/dnet/pysecstr Author: András Veres-Szentkirályi, Lawrence Fan Author-email: vsza@vsza.hu, fanl3@rpi.edu License: MIT Description-Content-Type: UNKNOWN Description: UNKNOWN Platform: UNKNOWN SecureString-0.2/SecureString.egg-info/SOURCES.txt0000644000175000017500000000024313223415237021672 0ustar dnetdnet00000000000000pysecstr.c setup.py SecureString.egg-info/PKG-INFO SecureString.egg-info/SOURCES.txt SecureString.egg-info/dependency_links.txt SecureString.egg-info/top_level.txtSecureString-0.2/SecureString.egg-info/dependency_links.txt0000644000175000017500000000000113223415237024055 0ustar dnetdnet00000000000000 SecureString-0.2/pysecstr.c0000644000175000017500000000254213124514713015722 0ustar dnetdnet00000000000000#define PY_SSIZE_T_CLEAN #include #include #if PY_MAJOR_VERSION >= 3 static PyObject* SecureString_clearmem(PyObject *self, PyObject *args) { char *buffer; Py_ssize_t length; if(!PyArg_ParseTuple(args, "s#", &buffer, &length)) { return NULL; } OPENSSL_cleanse(buffer, length); return Py_BuildValue(""); } #else static PyObject* SecureString_clearmem(PyObject *self, PyObject *str) { char *buffer; Py_ssize_t length; if (PyString_AsStringAndSize(str, &buffer, &length) != -1) { OPENSSL_cleanse(buffer, length); } return Py_BuildValue(""); } #endif #if PY_MAJOR_VERSION >= 3 static PyMethodDef SecureStringMethods[] = { {"clearmem", SecureString_clearmem, METH_VARARGS, "clear the memory of the string"}, {NULL, NULL, 0, NULL}, }; #else static PyMethodDef SecureStringMethods[] = { {"clearmem", SecureString_clearmem, METH_O, PyDoc_STR("clear the memory of the string")}, {NULL, NULL, 0, NULL}, }; #endif #if PY_MAJOR_VERSION >= 3 static struct PyModuleDef SecureStringDef = { PyModuleDef_HEAD_INIT, "SecureString", NULL, -1, SecureStringMethods, }; #endif #if PY_MAJOR_VERSION >= 3 PyMODINIT_FUNC PyInit_SecureString(void) { return PyModule_Create(&SecureStringDef); } #else PyMODINIT_FUNC initSecureString(void) { (void) Py_InitModule("SecureString", SecureStringMethods); } #endif