]> git.saurik.com Git - apple/security.git/blob - OSX/sec/SOSCircle/SecureObjectSync/SOSGenCount.h
Security-58286.60.28.tar.gz
[apple/security.git] / OSX / sec / SOSCircle / SecureObjectSync / SOSGenCount.h
1 //
2 // SOSGenCount.h
3 // sec
4 //
5 // Created by Richard Murphy on 1/29/15.
6 //
7 //
8
9 #ifndef _sec_SOSGenCount_
10 #define _sec_SOSGenCount_
11
12 #include <CoreFoundation/CoreFoundation.h>
13
14 typedef CFNumberRef SOSGenCountRef;
15
16 int64_t SOSGetGenerationSint(SOSGenCountRef gen);
17 SOSGenCountRef SOSGenerationCreate(void);
18 SOSGenCountRef SOSGenerationCreateWithValue(int64_t value);
19 SOSGenCountRef SOSGenerationIncrementAndCreate(SOSGenCountRef gen);
20 SOSGenCountRef SOSGenerationCopy(SOSGenCountRef gen);
21 bool SOSGenerationIsOlder(SOSGenCountRef current, SOSGenCountRef proposed);
22 SOSGenCountRef SOSGenerationCreateWithBaseline(SOSGenCountRef reference);
23
24 SOSGenCountRef SOSGenCountCreateFromDER(CFAllocatorRef allocator, CFErrorRef* error,
25 const uint8_t** der_p, const uint8_t *der_end);
26 size_t SOSGenCountGetDEREncodedSize(SOSGenCountRef gencount, CFErrorRef *error);
27 uint8_t *SOSGenCountEncodeToDER(SOSGenCountRef gencount, CFErrorRef* error, const uint8_t* der, uint8_t* der_end);
28
29 void SOSGenerationCountWithDescription(SOSGenCountRef gen, void (^operation)(CFStringRef description));
30 CFStringRef SOSGenerationCountCopyDescription(SOSGenCountRef gen);
31
32
33 #endif /* defined(_sec_SOSGenCount_) */