]>
git.saurik.com Git - apple/security.git/blob - KeychainCircle/KCDer.h
7 #include <Foundation/Foundation.h>
8 #include <corecrypto/ccder.h>
10 NS_ASSUME_NONNULL_BEGIN
12 // These should probably be shared with security, but we don't export our der'izing functions yet.
13 const uint8_t* _Nullable
14 kcder_decode_data_nocopy(NSData
* _Nullable
* _Nonnull data
,
15 NSError
* _Nullable
* _Nullable error
,
16 const uint8_t* _Nonnull der
, const uint8_t * _Nullable der_end
);
17 const uint8_t* _Nullable
18 kcder_decode_data(NSData
* _Nullable
* _Nonnull data
, NSError
* _Nullable
* _Nullable error
,
19 const uint8_t* der
, const uint8_t * _Nullable der_end
);
21 kcder_sizeof_data(NSData
* data
, NSError
** error
);
23 kcder_encode_data(NSData
* data
, NSError
**error
,
24 const uint8_t * _Nonnull der
, uint8_t * _Nullable der_end
);
26 kcder_encode_data_optional(NSData
* _Nullable data
, NSError
* _Nullable
* _Nullable error
,
27 const uint8_t *der
, uint8_t *der_end
);
29 const uint8_t* _Nullable
30 kcder_decode_string(NSString
*_Nullable
* _Nonnull string
,
31 NSError
* _Nullable
* _Nullable error
,
32 const uint8_t* _Nonnull der
,
33 const uint8_t* _Nullable der_end
);
35 kcder_sizeof_string(NSString
* string
,
36 NSError
* _Nullable
* _Nullable error
);
38 kcder_encode_string(NSString
* string
,
39 NSError
* _Nullable
* _Nullable error
,
40 const uint8_t * _Nonnull der
, uint8_t * _Nullable der_end
);
43 kcder_encode_raw_octet_space(size_t s_size
, uint8_t * _Nullable
* _Nonnull location
,
44 const uint8_t * _Nonnull der
, uint8_t * _Nullable der_end
);