소스 검색

clear data

Marino Faggiana 7 년 전
부모
커밋
80b15530b2
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  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];