#ifndef OTEscrow_h
#define OTEscrow_h
#if OCTAGON
#import <Foundation/Foundation.h>
#import <SecurityFoundation/SFKey.h>
NS_ASSUME_NONNULL_BEGIN
typedef enum {
kOTEscrowKeySigning = 1,
kOTEscrowKeyEncryption = 2,
kOTEscrowKeySymmetric = 3,
} escrowKeyType;
@interface OTEscrowKeys : NSObject
@property (nonatomic, readonly) SFECKeyPair* encryptionKey;
@property (nonatomic, readonly) SFECKeyPair* signingKey;
@property (nonatomic, readonly) SFAESKey* symmetricKey;
@property (nonatomic, readonly) NSData* secret;
@property (nonatomic, readonly) NSString* dsid;
-(instancetype) init NS_UNAVAILABLE;
- (nullable instancetype) initWithSecret:(NSData*)secret
dsid:(NSString*)dsid
error:(NSError* __autoreleasing *)error;
+ (SecKeyRef) createSecKey:(NSData*)keyData;
+ (BOOL) setKeyMaterialInKeychain:(NSDictionary*)query error:(NSError* __autoreleasing *)error;
+ (NSData* _Nullable) generateEscrowKey:(escrowKeyType)keyType
masterSecret:(NSData*)masterSecret
dsid:(NSString *)dsid
error:(NSError**)error;
@end
NS_ASSUME_NONNULL_END
#endif
#endif