CKKSCurrentKeyPointer.h [plain text]
#import <Foundation/Foundation.h>
#import "keychain/ckks/CKKS.h"
#import "keychain/ckks/CKKSItem.h"
#import "keychain/ckks/CKKSKey.h"
#import "keychain/ckks/CKKSTLKShareRecord.h"
#import "keychain/ckks/CKKSResultOperation.h"
#if OCTAGON
NS_ASSUME_NONNULL_BEGIN
@interface CKKSCurrentKeyPointer : CKKSCKRecordHolder
@property CKKSKeyClass* keyclass;
@property NSString* currentKeyUUID;
- (instancetype)initForClass:(CKKSKeyClass*)keyclass
currentKeyUUID:(NSString* _Nullable)currentKeyUUID
zoneID:(CKRecordZoneID*)zoneID
encodedCKRecord:(NSData* _Nullable)encodedrecord;
+ (instancetype)fromDatabase:(CKKSKeyClass*)keyclass zoneID:(CKRecordZoneID*)zoneID error:(NSError* __autoreleasing*)error;
+ (instancetype)tryFromDatabase:(CKKSKeyClass*)keyclass zoneID:(CKRecordZoneID*)zoneID error:(NSError* __autoreleasing*)error;
+ (instancetype)forKeyClass:(CKKSKeyClass*)keyclass
withKeyUUID:(NSString*)keyUUID
zoneID:(CKRecordZoneID*)zoneID
error:(NSError* __autoreleasing*)error;
+ (NSArray<CKKSCurrentKeyPointer*>*)all:(CKRecordZoneID*)zoneID error:(NSError* __autoreleasing*)error;
+ (bool)deleteAll:(CKRecordZoneID*)zoneID error:(NSError* __autoreleasing*)error;
@end
@interface CKKSCurrentKeySet : NSObject
@property NSString* viewName;
@property (nullable) NSError* error;
@property (nullable) CKKSKey* tlk;
@property (nullable) CKKSKey* classA;
@property (nullable) CKKSKey* classC;
@property (nullable) CKKSCurrentKeyPointer* currentTLKPointer;
@property (nullable) CKKSCurrentKeyPointer* currentClassAPointer;
@property (nullable) CKKSCurrentKeyPointer* currentClassCPointer;
@property BOOL proposed;
@property NSArray<CKKSTLKShareRecord*>* tlkShares;
@property (nullable) NSArray<CKKSTLKShareRecord*>* pendingTLKShares;
- (instancetype)initForZoneName:(NSString*)zoneName;
+ (CKKSCurrentKeySet*)loadForZone:(CKRecordZoneID*)zoneID;
- (CKKSKeychainBackedKeySet* _Nullable)asKeychainBackedSet:(NSError**)error;
@end
NS_ASSUME_NONNULL_END
#endif