mirror of
https://github.com/wiz0u/WTelegramClient.git
synced 2026-04-05 22:45:38 +00:00
Improve security by preventing replay attacks
This commit is contained in:
parent
3be28f0fbd
commit
a8d2dfcfa1
4 changed files with 53 additions and 11 deletions
|
|
@ -276,7 +276,7 @@ j4WcDuXc2CTHgH8gFTNhp/Y8/SpDOhvn9QIDAQAB
|
|||
|
||||
private static byte[] AES_IGE_EncryptDecrypt(Span<byte> input, byte[] aes_key, byte[] aes_iv, bool encrypt)
|
||||
{
|
||||
if (input.Length % 16 != 0) throw new ApplicationException("intput size not divisible by 16");
|
||||
if (input.Length % 16 != 0) throw new ApplicationException("AES_IGE input size not divisible by 16");
|
||||
|
||||
// code adapted from PHP implementation found at https://mgp25.com/AESIGE/
|
||||
var output = new byte[input.Length];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue