File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ @implementation AESCrypt
13
13
14
14
+ (NSData *)encryptData : (NSData *)data usingKey : (NSData *)key error : (NSError * _Nullable __autoreleasing *)error
15
15
{
16
- NSMutableData *dataOut = [[ NSMutableData alloc ] initWithCapacity: 16 ];
16
+ NSMutableData *dataOut = [NSMutableData dataWithLength: data.length + kCCBlockSizeAES128 ];
17
17
18
18
CCCryptorStatus status = CCCrypt (kCCEncrypt ,
19
19
kCCAlgorithmAES ,
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ struct AuthRequestTxMessage: TransmitterTxMessage {
19
19
20
20
NSUUID ( ) . getBytes ( & UUIDBytes)
21
21
22
- singleUseToken = Data ( bytes: UUIDBytes)
22
+ singleUseToken = Data ( bytes: UUIDBytes [ 0 ..< 8 ] )
23
23
}
24
24
25
25
var byteSequence : [ Any ] {
You can’t perform that action at this time.
0 commit comments