I created a file called ABCD with length 500 bytes. I am able to write DER
encoded DSA keys on it. The size of the keys vary from 490 to 496.

When calling ReadBinary, how do I know how many bytes of data
are in a file? Calling GetResponse only gives the size of the file, but
not how much data was written to it. 

The bytes that are not written to have value 0xff. For example, if I wrote
496 bytes to a 500 byte file, the last 4 bytes of the file have value
0xff. I guess I can use 0xff as a terminator much '\0' is used to
terminate a string in C, but then I wouldnt be able to use 0xff as a data
value.

thanks,
son

***************************************************************
Linux Smart Card Developers - M.U.S.C.L.E.
(Movement for the Use of Smart Cards in a Linux Environment)
http://www.linuxnet.com/smartcard/index.html
***************************************************************

Reply via email to