use ctypes and call the win32crypt code example Example: install win32crypt python install win32crypt python