translation help

  • Thread starter Thread starter Dirk Reske
  • Start date Start date
Dirk,

Looking at this line:

KeyBytes[0] = (byte)(LockBytes[0] ^ LockBytes[LockBytes.Length - 2] ^
LockBytes[LockBytes.Length - 1] ^ 5);

It should be (according to the original document):

KeyBytes[0] = (byte)(LockBytes[0] ^ LockBytes[LockBytes.Length - 1] ^
LockBytes[LockBytes.Length - 2] ^ 5);

Hope this helps.
 
no, this doesn't change anything.

Nicholas Paldino said:
Dirk,

Looking at this line:

KeyBytes[0] = (byte)(LockBytes[0] ^ LockBytes[LockBytes.Length - 2] ^
LockBytes[LockBytes.Length - 1] ^ 5);

It should be (according to the original document):

KeyBytes[0] = (byte)(LockBytes[0] ^ LockBytes[LockBytes.Length - 1] ^
LockBytes[LockBytes.Length - 2] ^ 5);

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Dirk Reske said:
Hello,

I have to calculate a key out of a "Lock".
But my method always returns a wrong key.

my method
http://home.t-online.de/home/detlef.reske/decode.cs

here is described, how the key have to be calculated
http://home.t-online.de/home/detlef.reske/Appendix_A.htm

more examples (other languages)
http://dcplusplus.sourceforge.net/wiki/index.php/LockToKey

perhaps someone find my mistake!
 
Back
Top