Created
May 16, 2017 10:04
-
-
Save biafra23/d9a353aec0da1108a31b0bd9011ff977 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signature signer = Signature.getInstance(Signature.ALG_ECDSA_SHA, false); | |
signer.init(cardPrivateKey, Signature.MODE_SIGN); | |
byte[] sigBuffer = new byte[100]; | |
short size = signer.sign(buffer, offset, length, sigBuffer, (short) 0); | |
byte[] result = new byte[size]; | |
Util.arrayCopyNonAtomic(sigBuffer, (short) 0, result, (short) 0, size); | |
return result; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment