]> git.saurik.com Git - apple/security.git/blob - keychain/ckks/tests/CKKSMockOctagonAdapter.h
Security-59306.61.1.tar.gz
[apple/security.git] / keychain / ckks / tests / CKKSMockOctagonAdapter.h
1 //
2 // CKKSMockOctagonAdapter.h
3 // Security
4 //
5 // Created by Love Hörnquist Åstrand on 6/19/19.
6 //
7
8 #import <Foundation/Foundation.h>
9
10 #import "keychain/ckks/CKKSPeer.h"
11 #import "keychain/ckks/CKKSListenerCollection.h"
12 #import "keychain/ot/OctagonCKKSPeerAdapter.h"
13
14 NS_ASSUME_NONNULL_BEGIN
15
16 @interface CKKSMockOctagonPeer : NSObject <CKKSPeer, CKKSRemotePeerProtocol>
17
18 @property NSString* peerID;
19 @property (nullable) SFECPublicKey* publicEncryptionKey;
20 @property (nullable) SFECPublicKey* publicSigningKey;
21 @property (nullable) NSSet<NSString*>* viewList;
22
23 - (instancetype)initWithOctagonPeerID:(NSString*)syncingPeerID
24 publicEncryptionKey:(SFECPublicKey* _Nullable)publicEncryptionKey
25 publicSigningKey:(SFECPublicKey* _Nullable)publicSigningKey
26 viewList:(NSSet<NSString*>* _Nullable)viewList;
27 @end
28
29 @interface CKKSMockOctagonAdapter : NSObject <CKKSPeerProvider>
30 @property CKKSListenerCollection* peerChangeListeners;
31 @property OctagonSelfPeer* selfOTPeer;
32 @property (nullable) NSSet<NSString*>* selfViewList;
33
34 @property NSMutableSet<id<CKKSRemotePeerProtocol>>* trustedPeers;
35 @property (readonly) NSString* providerID;
36
37 - (instancetype)initWithSelfPeer:(OctagonSelfPeer*)selfPeer
38 trustedPeers:(NSSet<id<CKKSRemotePeerProtocol>>*)trustedPeers
39 essential:(BOOL)essential;
40
41 @end
42
43
44 NS_ASSUME_NONNULL_END