OTBottledPeerSigned.h [plain text]
#if OCTAGON
#import <Foundation/Foundation.h>
#import "OTBottledPeer.h"
#import "OTBottledPeerRecord.h"
NS_ASSUME_NONNULL_BEGIN
@interface OTBottledPeerSigned : NSObject
@property (nonatomic, readonly) OTBottledPeer* bp;
@property (nonatomic, readonly) NSData* signatureUsingEscrowKey;
@property (nonatomic, readonly) NSData* signatureUsingPeerKey;
@property (nonatomic, readonly) NSData* escrowSigningSPKI;
- (instancetype) init NS_UNAVAILABLE;
- (nullable instancetype) initWithBottledPeer:(OTBottledPeer*)bp
escrowedSigningKey:(SFECKeyPair *)escrowedSigningKey
peerSigningKey:(SFECKeyPair *)peerSigningKey
error:(NSError**)error;
- (nullable instancetype) initWithBottledPeer:(OTBottledPeer*)bp
signatureUsingEscrow:(NSData*)signatureUsingEscrow
signatureUsingPeerKey:(NSData*)signatureUsingPeerKey
escrowedSigningPubKey:(SFECPublicKey *)escrowedSigningPubKey
error:(NSError**)error;
- (nullable instancetype) initWithBottledPeerRecord:(OTBottledPeerRecord *)record
escrowKeys:(OTEscrowKeys *)escrowKeys
error:(NSError**)error;
- (OTBottledPeerRecord *)asRecord:(NSString*)escrowRecordID;
+ (BOOL) verifyBottleSignature:(NSData*)data signature:(NSData*)signature key:(_SFECPublicKey*) pubKey error:(NSError**)error;
@end
NS_ASSUME_NONNULL_END
#endif