diff --git a/src/mtp_obfuscated.erl b/src/mtp_obfuscated.erl index eb40d25..8f2319c 100644 --- a/src/mtp_obfuscated.erl +++ b/src/mtp_obfuscated.erl @@ -64,11 +64,11 @@ client_create(Seed, Secret, Protocol, DcId) when byte_size(Seed) == 58, %% init_up_encrypt/2 <<_:8/binary, ToRev:(?KEY_LEN + ?IV_LEN)/binary, _/binary>> = Raw, <> = bin_rev(ToRev), - DecKey = crypto:hash('sha256', <>), + DecKey = crypto:hash('sha256', <>), %% init_up_decrypt/2 <<_:8/binary, EncKeySeed:?KEY_LEN/binary, EncIv:?IV_LEN/binary, _/binary>> = Raw, - EncKey = crypto:hash('sha256', <>), + EncKey = crypto:hash('sha256', <>), Codec = new(EncKey, EncIv, DecKey, DecIv), {<<_:56/binary, Encrypted:8/binary>>, Codec1} = encrypt(Raw, Codec), @@ -138,12 +138,12 @@ init_up_encrypt(Bin, Secret) -> Rev = bin_rev(ToRev), <> = Rev, %% <<_:32/binary, RevIV:16/binary, _/binary>> = Bin, - Key = crypto:hash('sha256', <>), + Key = crypto:hash('sha256', <>), {Key, IV}. init_up_decrypt(Bin, Secret) -> <<_:8/binary, KeySeed:?KEY_LEN/binary, IV:?IV_LEN/binary, _/binary>> = Bin, - Key = crypto:hash('sha256', <>), + Key = crypto:hash('sha256', <>), {Key, IV}. get_protocol(<<16#ef, 16#ef, 16#ef, 16#ef, _:2/binary>>) ->