Java Card 3.0.5 build error with verifyPreComputedHash() method

Viewed 231

I'm testing java card digital signing and I'm getting a build error in Eclipse as follows:

method verifyPreComputedHash(byte[], short, short, byte[], short, short) of class javacard.security.Signature not found in export file security.exp or the method signature has changed.

I'm invoking the method with the following line, where data and sig are byte arrays (byte[]) and the others are shorts.

success = signature.verifyPreComputedHash(data, dataOffset, dataLength, 
                                          sig, sigOffset, sigLength);

This matches the 3.0.5 spec definition.

What I've read is that the verifyPreComputedHash didn't exist for 3.0.4 and earlier but I just verified that my Eclipse is pointing to jcdk3.0.5u3 (Project -> Properties -> Java Card Runtime -> Java Card SDK Home -> C:\javacard\jcdk3.0.5u3)

I also have no issues with signature.signPreComputedHash(), signature.verify(), or signature.sign()... They all work.

Lastly, the file "jcdk3.0.5u3\api_export_files\javacard\security\javacard\security.exp" isn't easily readable, but the string "verifyPreComputedHash" appears in the file. By comparison, the 3.0.4 security.exp doesn't have the string "verifyPreComputedHash". So it's really not clear to me why I'd get this error.

Any thoughts?

0 Answers
Related