5 // Created by Richard Murphy on 1/29/15.
9 #ifndef _sec_SOSGenCount_
10 #define _sec_SOSGenCount_
12 #include <CoreFoundation/CoreFoundation.h>
14 typedef CFNumberRef SOSGenCountRef
;
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
);
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
);
29 void SOSGenerationCountWithDescription(SOSGenCountRef gen
, void (^operation
)(CFStringRef description
));
30 CFStringRef
SOSGenerationCountCopyDescription(SOSGenCountRef gen
);
33 #endif /* defined(_sec_SOSGenCount_) */