Skip to content

Commit b386104

Browse files
authored
Merge pull request #54 from pi4ohhi7/master
Auth bug fixes
2 parents 9eaa85c + 92057e8 commit b386104

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

xDripG5/AESCrypt.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ @implementation AESCrypt
1313

1414
+ (NSData *)encryptData:(NSData *)data usingKey:(NSData *)key error:(NSError * _Nullable __autoreleasing *)error
1515
{
16-
NSMutableData *dataOut = [[NSMutableData alloc] initWithCapacity:16];
16+
NSMutableData *dataOut = [NSMutableData dataWithLength: data.length + kCCBlockSizeAES128];
1717

1818
CCCryptorStatus status = CCCrypt(kCCEncrypt,
1919
kCCAlgorithmAES,

xDripG5/Messages/AuthRequestTxMessage.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ struct AuthRequestTxMessage: TransmitterTxMessage {
1919

2020
NSUUID().getBytes(&UUIDBytes)
2121

22-
singleUseToken = Data(bytes: UUIDBytes)
22+
singleUseToken = Data(bytes: UUIDBytes[0..<8])
2323
}
2424

2525
var byteSequence: [Any] {

0 commit comments

Comments
 (0)