mirror of
https://github.com/oxen-io/session-ios.git
synced 2023-12-13 21:30:14 +01:00
ccb4a88742
git remote add ssk ../SignalServiceKit git remote update git merge -s ours --allow-unrelated-histories --no-commit ssk/master git read-tree --prefix=SignalServiceKit -u ssk/master git commit
50 lines
2 KiB
Objective-C
50 lines
2 KiB
Objective-C
// Created by Michael Kirk on 9/14/16.
|
|
// Copyright © 2016 Open Whisper Systems. All rights reserved.
|
|
|
|
NS_ASSUME_NONNULL_BEGIN
|
|
|
|
@class UIImage;
|
|
|
|
@interface OWSFingerprint : NSObject
|
|
|
|
#pragma mark - Initializers
|
|
|
|
- (instancetype)init NS_UNAVAILABLE;
|
|
|
|
- (instancetype)initWithMyStableId:(NSString *)myStableId
|
|
myIdentityKey:(NSData *)myIdentityKeyWithoutKeyType
|
|
theirStableId:(NSString *)theirStableId
|
|
theirIdentityKey:(NSData *)theirIdentityKeyWithoutKeyType
|
|
theirName:(NSString *)theirName
|
|
hashIterations:(uint32_t)hashIterations NS_DESIGNATED_INITIALIZER;
|
|
|
|
+ (instancetype)fingerprintWithMyStableId:(NSString *)myStableId
|
|
myIdentityKey:(NSData *)myIdentityKeyWithoutKeyType
|
|
theirStableId:(NSString *)theirStableId
|
|
theirIdentityKey:(NSData *)theirIdentityKeyWithoutKeyType
|
|
theirName:(NSString *)theirName
|
|
hashIterations:(uint32_t)hashIterations;
|
|
|
|
+ (instancetype)fingerprintWithMyStableId:(NSString *)myStableId
|
|
myIdentityKey:(NSData *)myIdentityKeyWithoutKeyType
|
|
theirStableId:(NSString *)theirStableId
|
|
theirIdentityKey:(NSData *)theirIdentityKeyWithoutKeyType
|
|
theirName:(NSString *)theirName;
|
|
|
|
#pragma mark - Properties
|
|
|
|
@property (nonatomic, readonly) NSData *myStableIdData;
|
|
@property (nonatomic, readonly) NSData *myIdentityKey;
|
|
@property (nonatomic, readonly) NSString *theirStableId;
|
|
@property (nonatomic, readonly) NSData *theirStableIdData;
|
|
@property (nonatomic, readonly) NSData *theirIdentityKey;
|
|
@property (nonatomic, readonly) NSString *displayableText;
|
|
@property (nullable, nonatomic, readonly) UIImage *image;
|
|
|
|
#pragma mark - Instance Methods
|
|
|
|
- (BOOL)matchesLogicalFingerprintsData:(NSData *)data error:(NSError **)error;
|
|
|
|
@end
|
|
|
|
NS_ASSUME_NONNULL_END
|