|Modifier and Type||Method and Description|
Check that the signature is valid using the public key.
Generate the signature for a byte array using the private key.
byte sign(byte data, PrivateKey key) throws GeneralSecurityException
data- The byte array.
key- private key.
GeneralSecurityException- If there was a error generating the signature.
boolean check(byte data, PublicKey key, byte signature) throws GeneralSecurityException
data- The data for which the signature was generated.
key- The public key.
signature- The signature.
trueif the signature was valid. Otherwise,
GeneralSecurityException- If there was an error validating the signature.
Copyright © 2012–2016 Brian Matthews. All rights reserved.