3 ms·
In my case (old style DES hashes) it’s to interact with some old crusty garbage. Unfortunately a lot of that old crusty shit is still in production in many pla
by fullspectrumdev 3y ago
In my case (old style DES hashes) it’s to interact with some old crusty garbage.
Unfortunately a lot of that old crusty shit is still in production in many places, despite being EoL for years, with no plans to replace it this side of 2038.
- eesmith 3y agoCan you switch to ctypes? >>> from ctypes.util import find_library >>> find_library("c") '/usr/lib/libc.dylib' >>> from ctypes import cdll >>> libc = cdll.LoadLibrary(find_library("c")) >>> import ctypes >>> libc.crypt.argtypes = [ctypes.c_char_p, ctypes.c_char_p] >>> libc.crypt.restype = ctypes.c_char_p >>> libc.crypt(b"toomanysecrets", b"az") b'azi4LBG1VJohQ' Here is what Python's own _crypt does: >>> import _crypt >>> _crypt.crypt("toomanysecrets", "az") 'azi4LBG1VJohQ'