Browse Source

Fix implicit self warnings

Liam Butler-Lawrence 6 years ago
parent
commit
fdd12531f4
2 changed files with 6 additions and 6 deletions
  1. 2 2
      RNCryptor/RNDecryptor.m
  2. 4 4
      RNCryptor/RNEncryptor.m

+ 2 - 2
RNCryptor/RNDecryptor.m

@@ -166,7 +166,7 @@ static const NSUInteger kPreambleSize = 2;
 {
   dispatch_async(self.queue, ^{
     if (self.hasHMAC) {
-      CCHmacUpdate(&_HMACContext, data.bytes, data.length);
+      CCHmacUpdate(&self->_HMACContext, data.bytes, data.length);
     }
 
     NSError *error = nil;
@@ -309,7 +309,7 @@ static const NSUInteger kPreambleSize = 2;
       
     if (self.hasHMAC) {
       NSMutableData *HMACData = [NSMutableData dataWithLength:self.HMACLength];
-      CCHmacFinal(&_HMACContext, [HMACData mutableBytes]);
+      CCHmacFinal(&self->_HMACContext, [HMACData mutableBytes]);
       
       if (![HMACData rnc_isEqualInConsistentTime:self.inData]) {
           [self cleanupAndNotifyWithError:[NSError errorWithDomain:kRNCryptorErrorDomain

+ 4 - 4
RNCryptor/RNEncryptor.m

@@ -199,7 +199,7 @@
       NSData *header = [self header];
       [self.outData setData:header];
       if (self.hasHMAC) {
-        CCHmacUpdate(&_HMACContext, [header bytes], [header length]);
+        CCHmacUpdate(&self->_HMACContext, [header bytes], [header length]);
       }
       self.haveWrittenHeader = YES;
     }
@@ -210,7 +210,7 @@
       [self cleanupAndNotifyWithError:error];
     }
     if (self.hasHMAC) {
-      CCHmacUpdate(&_HMACContext, encryptedData.bytes, encryptedData.length);
+      CCHmacUpdate(&self->_HMACContext, encryptedData.bytes, encryptedData.length);
     }
 
     [self.outData appendData:encryptedData];
@@ -233,9 +233,9 @@
     NSData *encryptedData = [self.engine finishWithError:&error];
     [self.outData appendData:encryptedData];
     if (self.hasHMAC) {
-      CCHmacUpdate(&_HMACContext, encryptedData.bytes, encryptedData.length);
+      CCHmacUpdate(&self->_HMACContext, encryptedData.bytes, encryptedData.length);
       NSMutableData *HMACData = [NSMutableData dataWithLength:self.HMACLength];
-      CCHmacFinal(&_HMACContext, [HMACData mutableBytes]);
+      CCHmacFinal(&self->_HMACContext, [HMACData mutableBytes]);
       [self.outData appendData:HMACData];
     }
     [self cleanupAndNotifyWithError:error];