File tree 4 files changed +18
-3
lines changed
AxolotlKit/Classes/Prekeys
4 files changed +18
-3
lines changed Original file line number Diff line number Diff line change 5
5
#import < Curve25519Kit/Curve25519.h>
6
6
#import < Foundation/Foundation.h>
7
7
8
+ NS_ASSUME_NONNULL_BEGIN
8
9
9
10
@interface PreKeyRecord : NSObject <NSSecureCoding >
10
11
13
14
@property (nonatomic , readonly , nullable ) NSDate *createdAt;
14
15
15
16
- (instancetype )initWithId : (int )identifier
16
- keyPair : (ECKeyPair*)keyPair
17
+ keyPair : (ECKeyPair *)keyPair
17
18
createdAt : (NSDate *)createdAt ;
18
19
19
20
- (void )setCreatedAtToNow ;
20
21
21
22
@end
23
+
24
+ NS_ASSUME_NONNULL_END
Original file line number Diff line number Diff line change 8
8
9
9
#import " PreKeyRecord.h"
10
10
11
+ NS_ASSUME_NONNULL_BEGIN
12
+
11
13
static NSString * const kCoderPreKeyId = @" kCoderPreKeyId" ;
12
14
static NSString * const kCoderPreKeyPair = @" kCoderPreKeyPair" ;
13
15
static NSString * const kCoderCreatedAt = @" kCoderCreatedAt" ;
@@ -35,7 +37,7 @@ - (instancetype)initWithId:(int)identifier
35
37
return self;
36
38
}
37
39
38
- - (id )initWithCoder : (NSCoder *)aDecoder {
40
+ - (nullable id )initWithCoder : (NSCoder *)aDecoder {
39
41
return [self initWithId: [aDecoder decodeIntForKey: kCoderPreKeyId ]
40
42
keyPair: [aDecoder decodeObjectOfClass: [ECKeyPair class ] forKey: kCoderPreKeyPair ]
41
43
createdAt: [aDecoder decodeObjectOfClass: [NSDate class ] forKey: kCoderCreatedAt ]];
@@ -54,3 +56,5 @@ - (void)setCreatedAtToNow {
54
56
}
55
57
56
58
@end
59
+
60
+ NS_ASSUME_NONNULL_END
Original file line number Diff line number Diff line change 6
6
#import " PreKeyRecord.h"
7
7
#import < Curve25519Kit/Curve25519.h>
8
8
9
+ NS_ASSUME_NONNULL_BEGIN
10
+
9
11
@interface SignedPreKeyRecord : PreKeyRecord <NSSecureCoding >
10
12
11
13
@property (nonatomic , readonly ) NSData *signature;
19
21
- (void )markAsAcceptedByService ;
20
22
21
23
@end
24
+
25
+ NS_ASSUME_NONNULL_END
Original file line number Diff line number Diff line change 4
4
5
5
#import " SignedPrekeyRecord.h"
6
6
7
+ NS_ASSUME_NONNULL_BEGIN
8
+
7
9
static NSString * const kCoderPreKeyId = @" kCoderPreKeyId" ;
8
10
static NSString * const kCoderPreKeyPair = @" kCoderPreKeyPair" ;
9
11
static NSString * const kCoderPreKeyDate = @" kCoderPreKeyDate" ;
@@ -52,7 +54,7 @@ - (instancetype)initWithId:(int)identifier keyPair:(ECKeyPair *)keyPair signatur
52
54
return self;
53
55
}
54
56
55
- - (id )initWithCoder : (NSCoder *)aDecoder {
57
+ - (nullable id )initWithCoder : (NSCoder *)aDecoder {
56
58
return [self initWithId: [aDecoder decodeIntForKey: kCoderPreKeyId ]
57
59
keyPair: [aDecoder decodeObjectOfClass: [ECKeyPair class ] forKey: kCoderPreKeyPair ]
58
60
signature: [aDecoder decodeObjectOfClass: [NSData class ] forKey: kCoderPreKeySignature ]
@@ -79,3 +81,5 @@ - (void)markAsAcceptedByService
79
81
}
80
82
81
83
@end
84
+
85
+ NS_ASSUME_NONNULL_END
You can’t perform that action at this time.
0 commit comments