Skip to content

Commit

Permalink
Merge pull request #54 from pi4ohhi7/master
Browse files Browse the repository at this point in the history
Auth bug fixes
  • Loading branch information
ps2 authored Jun 2, 2017
2 parents 9eaa85c + 92057e8 commit b386104
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion xDripG5/AESCrypt.m
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ @implementation AESCrypt

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

CCCryptorStatus status = CCCrypt(kCCEncrypt,
kCCAlgorithmAES,
Expand Down
2 changes: 1 addition & 1 deletion xDripG5/Messages/AuthRequestTxMessage.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ struct AuthRequestTxMessage: TransmitterTxMessage {

NSUUID().getBytes(&UUIDBytes)

singleUseToken = Data(bytes: UUIDBytes)
singleUseToken = Data(bytes: UUIDBytes[0..<8])
}

var byteSequence: [Any] {
Expand Down

0 comments on commit b386104

Please sign in to comment.