Browse Source

clear data

Marino Faggiana 7 years ago
parent
commit
80b15530b2
1 changed files with 3 additions and 1 deletions
  1. 3 1
      iOSClient/Security/NCEndToEndEncryption.m

+ 3 - 1
iOSClient/Security/NCEndToEndEncryption.m

@@ -716,8 +716,10 @@ cleanup:
     if (! status)
         return NO;
     
+    // remove TAG JAVA compatibility
+    cipherData = [cipherData subdataWithRange:NSMakeRange(0, cipherData.length - 16)];
+    
     // Provide the message to be decrypted, and obtain the plaintext output
-    cipherData = [cipherData subdataWithRange:NSMakeRange(0, cipherData.length - 16)]; // remove TAG JAVA compatibility
     *plainData = [NSMutableData dataWithLength:([cipherData length])];
     int pPlainLen = 0;
     unsigned char * pPlain = [*plainData mutableBytes];