]> git.saurik.com Git - apple/security.git/blobdiff - OSX/utilities/SecXPCHelper.h
Security-59306.11.20.tar.gz
[apple/security.git] / OSX / utilities / SecXPCHelper.h
diff --git a/OSX/utilities/SecXPCHelper.h b/OSX/utilities/SecXPCHelper.h
new file mode 100644 (file)
index 0000000..905eca6
--- /dev/null
@@ -0,0 +1,27 @@
+//
+//  SecXPCHelper.h
+//  Security
+//
+
+#ifndef SecXPCHelper_h
+#define SecXPCHelper_h
+
+#import <Foundation/Foundation.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface SecXPCHelper : NSObject
++ (NSSet<Class> *)safeErrorClasses;
++ (NSError *)cleanseErrorForXPC:(NSError * _Nullable)error;
+
+/*
+ * Some NSError objects contain non-NSSecureCoding-compliant userInfo.
+ * When in doubt, use cleanseErrorForXPC: before encodedDataFromError:
+ */
++ (NSError *)errorFromEncodedData:(NSData *)data;
++ (NSData *)encodedDataFromError:(NSError *)error;
+@end
+
+NS_ASSUME_NONNULL_END
+
+#endif // SecXPCHelper_h