예제 #1
0
 private static string ScrambleNonce(ulong clientSeed, byte[] serverNonce)
 {
     var scrambler = new Scrambler(clientSeed);
     var byte100 = 0;
     for (int i = 0; i < 100; i++)
         byte100 = scrambler.GetByte();
     var scrambled = string.Empty;
     for (int i = 0; i < serverNonce.Length; i++)
         scrambled += (char)(serverNonce[i] ^ (scrambler.GetByte() & byte100));
     return scrambled;
 }
예제 #2
0
 private static string ScrambleNonce(ulong clientSeed, byte[] serverNonce)
 {
     var scrambler = new Scrambler(clientSeed);
     var byte100 = 0;
     for (int i = 0; i < 100; i++)
         byte100 = scrambler.GetByte();
     var scrambled = string.Empty;
     for (int i = 0; i < serverNonce.Length; i++)
         scrambled += (char)(serverNonce[i] ^ (scrambler.GetByte() & byte100));
     return scrambled;
 }