PDA

View Full Version : [SOLVED] Java - Octet to hex



rlzyoner
December 8th, 2008, 08:03 PM
Howdy,

I've been asked to assist a friend with implementing an algorithm.
He need me to
"Convert 2 octets to their hexadecimal values, for example "3136 1731" becomes 0x65E 0x3D9"

I need to do this using java.

Cryptography wouldnt be my strong point.
Is there a simple way of implementing this.

Thanks

bapoumba
December 8th, 2008, 10:52 PM
Is this for an assignment?

drubin
December 8th, 2008, 11:03 PM
Howdy,

I've been asked to assist a friend with implementing an algorithm.
He need me to

I would suggest he asks the questions. This whole idea of getting some one else to do the research and then spoon feed him/her the answer is not going to help him at all (although it might help you )



"Convert 2 octets to their hexadecimal values, for example "3136 1731" becomes 0x65E 0x3D9"

I need to do this using java.

I know it is against the COC for me to say google. so instead I am going to say use a search engine and type the exact same words as in your title.

Even if this isn't for school programming is about learning and learning is what should happen. :) It is pointless for us to give you the answer but take a look at base number systems most of the methods take in a base number. use that convert to decimal then back to what you would like



Cryptography wouldnt be my strong point.
Is there a simple way of implementing this.

This isn't Cryptography (http://en.wikipedia.org/wiki/Cryptography)

is the practice and study of hiding information. In modern times, cryptography