Afficher un message
Vieux 05/08/2015, 19h31  
MrRorry
Moderateur
 
Avatar de MrRorry
 
Date d'inscription: juin 2015
Localisation: France, Paris
Messages: 639
Thanks: 383
Thanked 4 577 Times in 460 Posts
Pouvoir de réputation: 77
MrRorry has a reputation beyond reputeMrRorry has a reputation beyond reputeMrRorry has a reputation beyond reputeMrRorry has a reputation beyond reputeMrRorry has a reputation beyond reputeMrRorry has a reputation beyond reputeMrRorry has a reputation beyond reputeMrRorry has a reputation beyond reputeMrRorry has a reputation beyond reputeMrRorry has a reputation beyond reputeMrRorry has a reputation beyond repute
Par défaut

Petite correction pour l'exemple (Merci a sandy976)
======================================

0x85, 0xC2, 0x55, 0xDA on swap les octets comme cela 2 - 1 - 4 - 3

on se retrouve avec 0xC2, 0x85, 0xDA, 0x55

- on XOR octet 1 avec octet 2, octet 2 avec octet 3, octet 3 avec octet 4, octet 4 avec octet 1
>> maintenant le swap prend tout son sens car si on swap pas, on se retrouve avec des valeurs differentes.

on se retrouve donc avec ce nouveau tableau de 4 octets : 0x47, 0x5F, 0x8F, 0x12

- on fait un XOR 0xAA sur chaque octet et on multiplie le tout (le resultat a l'octet suivant)

0x47 xor 0xAA = 0xDE (222 en decimal)
0x5F xor 0xAA = 0xF5 (245 en decimal)
0x8F xor 0xAA = 0x25 (37 en decimal)
0x12 xor 0xAA = 0xB8 (184 en decimal)

222 * 245 * 37 * 184 = 370287120

Resultat = 287120

Voila, toutes mes excuses.
MrRorry est déconnecté   Réponse avec citation
The Following User Says Thank You to MrRorry For This Useful Post:
souague (27/02/2020)