diff --git a/submodules/MtProtoKit/Sources/MTEncryption.m b/submodules/MtProtoKit/Sources/MTEncryption.m index 4df030344c..348e3065a3 100644 --- a/submodules/MtProtoKit/Sources/MTEncryption.m +++ b/submodules/MtProtoKit/Sources/MTEncryption.m @@ -292,12 +292,13 @@ NSData *MTAesDecrypt(NSData *data, NSData *key, NSData *iv) NSData *MTRsaEncrypt(id provider, NSString *publicKey, NSData *data) { #if TARGET_OS_IOS - NSMutableData *updatedData = [[NSMutableData alloc] initWithData:data]; + return [provider rsaEncryptWithPublicKey:publicKey data:data]; + /*NSMutableData *updatedData = [[NSMutableData alloc] initWithData:data]; while (updatedData.length < 256) { uint8_t zero = 0; [updatedData replaceBytesInRange:NSMakeRange(0, 0) withBytes:&zero length:1]; } - return [MTRsa encryptData:updatedData publicKey:publicKey]; + return [MTRsa encryptData:updatedData publicKey:publicKey];*/ #else return [provider macosRSAEncrypt:publicKey data:data]; #endif