Easiest way I've found is the following



String s = "34BCD123";

BigInteger bi = new BigInteger( s, 16 );

byte[]    b = bi.toByteArray( );



Of course you could write your own hex parser but I wouldn't bother



----- Original Message -----
From: Davide Fiorentino <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: 22 June 1999 17:21
Subject: [OCF] Converting from hex to byte and using OCF


> Hi everybody,
>
> I wish know how to convert hex strings to byte to send them with APDU. I
use
> the GCR410 and GPM896. I'd be grateful if someone could help me, even 'cos
I
> can't use the .dll file (where I had to put them to work?).
>
> Thank you a lot
>
>
> Visit the OpenCard Framework's WWW site at http://www.opencard.org/ for
> access to documentation, code, presentations, and OCF announcements.
> --------------------------------------------------------------------------
---
> To unsubscribe from the OCF Mailing list, send a mail to
> "[EMAIL PROTECTED]" with the word "unsubscribe" in the BODY of
the
> message.

Visit the OpenCard Framework's WWW site at http://www.opencard.org/ for
access to documentation, code, presentations, and OCF announcements.
-----------------------------------------------------------------------------
To unsubscribe from the OCF Mailing list, send a mail to
"[EMAIL PROTECTED]" with the word "unsubscribe" in the BODY of the
message.

Reply via email to