473,320 Members | 2,112 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

translation help

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....Appendix_A.htm

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

perhaps someone find my mistake!
Nov 16 '05 #1
2 1147
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]
- mv*@spam.guard.caspershouse.com

"Dirk Reske" <_F*******@gmx.net> wrote in message
news:eA**************@tk2msftngp13.phx.gbl...
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....Appendix_A.htm

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

perhaps someone find my mistake!

Nov 16 '05 #2
no, this doesn't change anything.

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> schrieb
im Newsbeitrag news:%2****************@TK2MSFTNGP11.phx.gbl...
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]
- mv*@spam.guard.caspershouse.com

"Dirk Reske" <_F*******@gmx.net> wrote in message
news:eA**************@tk2msftngp13.phx.gbl...
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....Appendix_A.htm

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

perhaps someone find my mistake!


Nov 16 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Stephen Ferg | last post by:
I need to translate some Perl scripts into Python. When I went looking for a tool that would help automate the translation, I was rather surprised that I couldn't find anything. BridgeKeeper,...
7
by: Bengt Richter | last post by:
Just thought None as the first argument would be both handy and mnemonic, signifying no translation, but allowing easy expression of deleting characters, e.g., s = s.translate(None,...
0
by: Matt | last post by:
Short Description: The Translation Hub is not picking up the TNS names file. I'm using Oracle 9ids. It doesn't work for any users and it has never worked since it's been installed. Long...
7
by: Steven T. Hatton | last post by:
Is there anything that gives a good description of how source code is converted into a translation unit, then object code, and then linked. I'm particularly interested in understanding why putting...
1
by: translation | last post by:
I have started a new project called "Free Localization" http://www.freelocalization.co­m/ . Free Localization is a collaborative translation project to help webmasters get free multilingual...
3
by: Francois Suter | last post by:
A (renewed) effort has been launched by Guillaume Lelarge (with the help of Jerome Seyler and myself) to translate PostgreSQL to French. The goal is to translate the various applications, the...
2
by: DOA | last post by:
Help! I've been doing C language development for a long time, but this problem has me stumped. I would like the user to be able to enter the name of a function that has been linked into the...
9
by: tiger79 | last post by:
Hi, I've been translating some API's from VB to C# for a couple of days now. Only I'm a real newbie to both languages, but I managed to do most of it except the next statements, so if anyone knows...
4
by: gw7rib | last post by:
If a class has more than one member function, is it possible for the code for one to be in one translation unit (ie file) and the code for another to be in a different translation unit? I would...
0
by: Stef Mientki | last post by:
hello, I've build a translation tool, to translate all strings in a python source file. As a extra gadget I added translation through Babel Fish, using beautifulsoup. Although it works...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.