This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import objc | |
from Foundation import NSBundle | |
Security_bundle = NSBundle.bundleWithIdentifier_('com.apple.security') | |
CMSDecoderRef = objc.createOpaquePointerType("CMSDecoderRef", b"^{CMSDecoder}", None) | |
functions = [('CMSDecoderCreate', b'io^^{CMSDecoder}'), | |
('CMSDecoderUpdateMessage', b'i^{CMSDecoder}*I'), | |
('CMSDecoderFinalizeMessage', b'i^{CMSDecoder}',), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import base64, hashlib | |
from ctypes import CDLL, POINTER, Structure, create_string_buffer, byref | |
from ctypes.util import find_library | |
Security = CDLL(find_library('Security')) | |
# Importing this via C because haven't figured out how to mix in pyObjc version yet | |
c_CoreFoundation = CDLL(find_library('CoreFoundation')) | |
class OpaqueType(Structure): | |
pass |