]> git.saurik.com Git - apple/security.git/blobdiff - keychain/SecureObjectSync/SOSGenCount.h
Security-59306.11.20.tar.gz
[apple/security.git] / keychain / SecureObjectSync / SOSGenCount.h
diff --git a/keychain/SecureObjectSync/SOSGenCount.h b/keychain/SecureObjectSync/SOSGenCount.h
new file mode 100644 (file)
index 0000000..fc42595
--- /dev/null
@@ -0,0 +1,33 @@
+//
+//  SOSGenCount.h
+//  sec
+//
+//  Created by Richard Murphy on 1/29/15.
+//
+//
+
+#ifndef _sec_SOSGenCount_
+#define _sec_SOSGenCount_
+
+#include <CoreFoundation/CoreFoundation.h>
+
+typedef CFNumberRef SOSGenCountRef;
+
+int64_t SOSGetGenerationSint(SOSGenCountRef gen);
+SOSGenCountRef SOSGenerationCreate(void);
+SOSGenCountRef SOSGenerationCreateWithValue(int64_t value);
+SOSGenCountRef SOSGenerationIncrementAndCreate(SOSGenCountRef gen);
+SOSGenCountRef SOSGenerationCopy(SOSGenCountRef gen);
+bool SOSGenerationIsOlder(SOSGenCountRef current, SOSGenCountRef proposed);
+SOSGenCountRef SOSGenerationCreateWithBaseline(SOSGenCountRef reference);
+
+SOSGenCountRef SOSGenCountCreateFromDER(CFAllocatorRef allocator, CFErrorRef* error,
+                                        const uint8_t** der_p, const uint8_t *der_end);
+size_t SOSGenCountGetDEREncodedSize(SOSGenCountRef gencount, CFErrorRef *error);
+uint8_t *SOSGenCountEncodeToDER(SOSGenCountRef gencount, CFErrorRef* error, const uint8_t* der, uint8_t* der_end);
+
+void SOSGenerationCountWithDescription(SOSGenCountRef gen, void (^operation)(CFStringRef description));
+CFStringRef SOSGenerationCountCopyDescription(SOSGenCountRef gen);
+
+
+#endif /* defined(_sec_SOSGenCount_) */