Key management flexibility means that keys can be handled either by the system, or by the application, as appropriate. The Signature class is the developer's interface to all signature functionality for a given algorithm. It can sign, verify a signature, or generate keys for that algorithm. We now have a DSA key pair, and a signature object. A future version of this document will show how to get a key pair for a given identity.
Signing is done on a set of bytes.
The signing interface is stream-oriented, letting you specify what bytes are to be signed through the update method. There are two types of update methods, one which works on byte arrays and one which works on a single byte at a time. Verifying a Signature Now suppose that we want to verify whether or not an alleged signature is in fact the authentic signature of the data associated with it. In order to verify the signature, we must first initialize a signature object for verification. To do so, we call initVerify with the public key for the identity whose signature is going to be verified.