I was told that I have to take a 56 bit hex number (MEID) and convert it to a
32 bit hex number (pESN). The end result should look like this..
* The upper 8 bits of pseudo-ESN shall be set to 0x80.
* The lower 24 bits of pseudo-ESN shall be the 24 least significant bits
of the SHA-1 digest of the MEID.

So the pESN should be 80 XX XX XX.
An example is this..
Example: if the 56-bit MEID is (hexadecimal) FF 00 00 01 12 34 56, the
pseudo-ESN is
(hexadecimal) 80 07 37 E1.

I can't get this to compute..
I downloaded the a tag from cflib.. http://www.cflib.org/udf.cfm?ID=34
and it returns the digest of when applying the SHA-1 algorithm to
"FF000001123456":
9894AF3B86038B3E14D7313C726CCDDD9319124E

I've tried using InputBaseN and FormatBaseN and I'm having no luck.  
Given message=FF000001123456
The SHA-1 message digest is: 9894AF3B86038B3E14D7313C726CCDDD9319124E

So I need to get the 24 least significant bits and convert it to hex
and some how it'll equal
07 37 E1.

I'm taking the last 8 digits from the digest and playing around with
that "9319124E"
Given message=FF000001123456
The SHA-1 message digest is: 9319124E
InputBaseN(sha,16): -1827073458
Right 24 (binary): 000110010001001001001110 <- that should be the
least 24 significant bits


To Number: 1643086 <- using inputbasen
To Hex: 19124e <- using formatbasen

and that hex doesnt equal 0737E1


What am I missing here?


-- 
Auxilium meum a Domino

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:212172
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to