I'm programming in c# and trying to convert a console input to Hex. Input is a number between 1-256 (ex. 125) The converted number should look like this:
fpr 125: 0x31, 0x32, 0x35
I already tried to solve my problem for hours by using:
byte[] array = Encoding.ASCII.GetBytes(Senke)
but it always shows me byte[]
.
I need this conversion for creating an APDU to write Information on my smartcard by using my SmartCard Application the final Apdu will look like this:
{ 0xFF, 0xD6, 0x00, 0x02, 0x10, 0x31, 0x32, 0x35}
I hope that someone can help me with this.