]> git.saurik.com Git - apple/security.git/blob - OSX/utilities/SecXPCHelper.h
Security-59754.41.1.tar.gz
[apple/security.git] / OSX / utilities / SecXPCHelper.h
1 //
2 // SecXPCHelper.h
3 // Security
4 //
5
6 #ifndef SecXPCHelper_h
7 #define SecXPCHelper_h
8
9 #import <Foundation/Foundation.h>
10
11 NS_ASSUME_NONNULL_BEGIN
12
13 @interface SecXPCHelper : NSObject
14 + (NSSet<Class> *)safeErrorClasses;
15 + (NSError * _Nullable)cleanseErrorForXPC:(NSError * _Nullable)error;
16
17 /*
18 * Some NSError objects contain non-NSSecureCoding-compliant userInfo.
19 * When in doubt, use cleanseErrorForXPC: before encodedDataFromError:
20 */
21 + (NSError * _Nullable)errorFromEncodedData:(NSData *)data;
22 + (NSData *)encodedDataFromError:(NSError *)error;
23 @end
24
25 NS_ASSUME_NONNULL_END
26
27 #endif // SecXPCHelper_h