1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ptr::NonNull;
use objc2_core_foundation::*;
use crate::*;
extern "C" {
/// Used with SecTransformGetAttribute to query the attribute type.
/// Returns one of the strings defined in the previous section.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/security/ksecdecodetypeattribute?language=objc)
pub static kSecDecodeTypeAttribute: &'static CFString;
}
/// Creates an decode computation object.
///
/// Parameter `DecodeType`: The type of digest to decode. You may pass NULL
/// for this parameter, in which case an appropriate
/// algorithm will be chosen for you.
///
/// Parameter `error`: A pointer to a CFErrorRef. This pointer will be set
/// if an error occurred. This value may be NULL if you
/// do not want an error returned.
///
/// Returns: A pointer to a SecTransformRef object. This object must
/// be released with CFRelease when you are done with
/// it. This function will return NULL if an error
/// occurred.
///
/// This function creates a transform which computes a
/// decode.
///
/// # Safety
///
/// - `decode_type` should be of the correct type.
/// - `error` must be a valid pointer or null.
#[cfg(feature = "SecTransform")]
#[deprecated = "SecTransform is no longer supported"]
#[inline]
pub unsafe extern "C-unwind" fn SecDecodeTransformCreate(
decode_type: &CFType,
error: *mut *mut CFError,
) -> Option<CFRetained<SecTransform>> {
extern "C-unwind" {
fn SecDecodeTransformCreate(
decode_type: &CFType,
error: *mut *mut CFError,
) -> Option<NonNull<SecTransform>>;
}
let ret = unsafe { SecDecodeTransformCreate(decode_type, error) };
ret.map(|ret| unsafe { CFRetained::from_raw(ret) })
}