Signature.sign

Signature.sign

Class Overview | Class Members | This Package | All Packages

Syntax
public final byte[] sign() throws SignatureException
Returns
the signature bytes of the signing operation's result.
Description
Returns the signature bytes of all the data updated. The signature returned is X.509-encoded.

A call to this method resets this signature object to the state it was in when previously initialized for signing via a call to initSign(PrivateKey). That is, the object is reset and available to generate another signature from the same signer, if desired, via new calls to update and sign.

Exceptions
SignatureException if this signature object is not initialized properly.