@@ -77,6 +77,10 @@ pub type thread_latency_qos_policy_t = *mut thread_latency_qos_policy;
77
77
pub type thread_throughput_qos_policy_data_t = thread_throughput_qos_policy ;
78
78
pub type thread_throughput_qos_policy_t = * mut thread_throughput_qos_policy ;
79
79
80
+ pub type CCStatus = i32 ;
81
+ pub type CCCryptorStatus = i32 ;
82
+ pub type CCRNGStatus = :: CCCryptorStatus ;
83
+
80
84
deprecated_mach ! {
81
85
pub type vm_prot_t = :: c_int;
82
86
pub type vm_size_t = :: uintptr_t;
@@ -3515,6 +3519,21 @@ pub const THREAD_BACKGROUND_POLICY_DARWIN_BG: ::c_int = 0x1000;
3515
3519
pub const THREAD_LATENCY_QOS_POLICY : :: c_int = 7 ;
3516
3520
pub const THREAD_THROUGHPUT_QOS_POLICY : :: c_int = 8 ;
3517
3521
3522
+ // CommonCrypto/CommonCryptoError.h
3523
+ pub const kCCSuccess: i32 = 0 ;
3524
+ pub const kCCParamError: i32 = -4300 ;
3525
+ pub const kCCBufferTooSmall: i32 = -4301 ;
3526
+ pub const kCCMemoryFailure: i32 = -4302 ;
3527
+ pub const kCCAlignmentError: i32 = -4303 ;
3528
+ pub const kCCDecodeError: i32 = -4304 ;
3529
+ pub const kCCUnimplemented: i32 = -4305 ;
3530
+ pub const kCCOverflow: i32 = -4306 ;
3531
+ pub const kCCRNGFailure: i32 = -4307 ;
3532
+ pub const kCCUnspecifiedError: i32 = -4308 ;
3533
+ pub const kCCCallSequenceError: i32 = -4309 ;
3534
+ pub const kCCKeySizeError: i32 = -4310 ;
3535
+ pub const kCCInvalidKey: i32 = -4311 ;
3536
+
3518
3537
cfg_if ! {
3519
3538
if #[ cfg( libc_const_extern_fn) ] {
3520
3539
const fn __DARWIN_ALIGN32( p: usize ) -> usize {
@@ -4139,6 +4158,8 @@ extern "C" {
4139
4158
///
4140
4159
/// `id` is of type [`uuid_t`].
4141
4160
pub fn gethostuuid ( id : * mut u8 , timeout : * const :: timespec ) -> :: c_int ;
4161
+
4162
+ pub fn CCRandomGenerateBytes ( bytes : * mut :: c_void , size : :: size_t ) -> :: CCRNGStatus ;
4142
4163
}
4143
4164
4144
4165
cfg_if ! {
0 commit comments