HEX
Server: Apache
System: Linux 185.122.168.184.host.secureserver.net 5.14.0-570.60.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Nov 5 05:00:59 EST 2025 x86_64
User: barbeatleanalyti (1024)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: //proc/thread-self/root/var/opt/nydus/ops/oscrypto/_mac/_common_crypto_cffi.py
# coding: utf-8
from __future__ import unicode_literals, division, absolute_import, print_function

from .._ffi import register_ffi

from cffi import FFI


__all__ = [
    'CommonCrypto',
]


ffi = FFI()
ffi.cdef("""
    typedef uint32_t CCPBKDFAlgorithm;

    typedef uint32_t CCPseudoRandomAlgorithm;
    typedef unsigned int uint;

    int CCKeyDerivationPBKDF(CCPBKDFAlgorithm algorithm, const char *password, size_t passwordLen,
                    const char *salt, size_t saltLen, CCPseudoRandomAlgorithm prf, uint rounds,
                    char *derivedKey, size_t derivedKeyLen);
""")

common_crypto_path = '/usr/lib/system/libcommonCrypto.dylib'

CommonCrypto = ffi.dlopen(common_crypto_path)
register_ffi(CommonCrypto, ffi)