Skip to Main Content

Java Card

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

What is wrong?????????????

843851Jun 8 2004 — edited Jun 15 2004
i try the sign data on card.
but it doesn't work. there is a problem in the line sign..... but i don't see the error. could you please help me?

signature = Signature.getInstance(Signature.ALG_RSA_SHA_PKCS1, false);

// Create Signature
signature.init(rsa_PrivateCrtKey_generatedOnCard, Signature.MODE_SIGN);

signature.sign(apduBuffer,(short)APDUDATA, byteRead, apduBuffer, (short)(APDUDATA+32));


// Send results
apdu.setOutgoing();
// indicate the number of bytes in the data field
apdu.setOutgoingLength((short)52); // data=32 bytes signature 20 bytes

// at offset 0 send 52 byte of data in the buffer
apdu.sendBytesLong(apduBuffer, (short)APDUDATA, (short)52);

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 13 2004
Added on Jun 8 2004
4 comments
98 views