C
Camilo
Greetings!
For a project we are deveolping, we need to guess the algorithm used to
generate a code for an integer number. The only information we have is some
pairs of integers and codes generated. My bet is that the code is being
generated with a HASH function. I have already tried with SHA1, but it
returns 20 values, and the examples I have have 16 values. I also think that
the codes generated are numbers in hexadecimal notation. Here are some
examples:
Integer: 45300
Code: 93-ED-E6-05-1F-BF-6E-44-8A-9F-14-75-17-1F-18-B8
Integer: 45490
Code: 12-C3-E9-1C-79-0A-DA-82-BB-F0-E0-80-B3-3C-0A-A3
Integer: 45489
Code: 2E-D3-82-39-B3-80-29-A0-28-07-B9-23-89-88-26-86
Integer: 45494
Code: 35-27-6B-23-5A-BE-9B-2D-04-66-6B-4E-01-78-A4-5D
Using the .NET SHA1Managed class I get for the integer 45300 the following
hash code (in decimal notation):
104-5-86-253-188-142-133-231-42-3-221-243-69-10-31-2-49-221-55-52
As this is not a critical securtity application, the solutions must be
pretty simple.
Any ideas?
Cheers,
Camilo
For a project we are deveolping, we need to guess the algorithm used to
generate a code for an integer number. The only information we have is some
pairs of integers and codes generated. My bet is that the code is being
generated with a HASH function. I have already tried with SHA1, but it
returns 20 values, and the examples I have have 16 values. I also think that
the codes generated are numbers in hexadecimal notation. Here are some
examples:
Integer: 45300
Code: 93-ED-E6-05-1F-BF-6E-44-8A-9F-14-75-17-1F-18-B8
Integer: 45490
Code: 12-C3-E9-1C-79-0A-DA-82-BB-F0-E0-80-B3-3C-0A-A3
Integer: 45489
Code: 2E-D3-82-39-B3-80-29-A0-28-07-B9-23-89-88-26-86
Integer: 45494
Code: 35-27-6B-23-5A-BE-9B-2D-04-66-6B-4E-01-78-A4-5D
Using the .NET SHA1Managed class I get for the integer 45300 the following
hash code (in decimal notation):
104-5-86-253-188-142-133-231-42-3-221-243-69-10-31-2-49-221-55-52
As this is not a critical securtity application, the solutions must be
pretty simple.
Any ideas?
Cheers,
Camilo