From 648e414f69a66eedb09413cbf4bf56f59fcdcb5d Mon Sep 17 00:00:00 2001 From: Ali <> Date: Sun, 4 Jul 2021 18:50:21 +0400 Subject: [PATCH] Fix typo [skip ci] --- .../MtProtoKit/Sources/MTDatacenterAuthMessageService.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/submodules/MtProtoKit/Sources/MTDatacenterAuthMessageService.m b/submodules/MtProtoKit/Sources/MTDatacenterAuthMessageService.m index 6f78dbf3a2..66929449f9 100644 --- a/submodules/MtProtoKit/Sources/MTDatacenterAuthMessageService.m +++ b/submodules/MtProtoKit/Sources/MTDatacenterAuthMessageService.m @@ -504,7 +504,7 @@ static NSData *encryptRSAModernPadding(id encryptionProvider } [bignumContext assignBinTo:bignumKeyAesEncrypted value:keyAesEncrypted]; int compareResult = [bignumContext compare:rsaModule with:bignumKeyAesEncrypted]; - if (compareResult == -1) { + if (compareResult < 0) { continue; } @@ -513,7 +513,7 @@ static NSData *encryptRSAModernPadding(id encryptionProvider [paddedEncryptedData appendData:encryptedData]; while (paddedEncryptedData.length < 256) { uint8_t zero = 0; - [paddedEncryptedData replaceBytesInRange:NSMakeRange(0, 0) withBytes:&zero]; + [paddedEncryptedData replaceBytesInRange:NSMakeRange(0, 0) withBytes:&zero length:1]; } if (paddedEncryptedData.length != 256) {