Name
Class java.security.Signature
Synopsis
This engine class provides the ability to create or verify digital
signatures by employing different algorithms that have been
registered with the Security
class. As with all
engine classes, instances of this class are obtained via the
getInstance( )
method. The signature object must
be initialized with the appropriate private key (to sign) or public
key (to verify), then data must be fed to the object via the
update( )
methods, and then the signature can be
obtained (via the sign( )
method) or verified
(via the verify( )
method). Signature objects
may support algorithm-specific parameters, though this is not a
common implementation.
Class Definition
public abstract class java.security.Signature extends java.security.SignatureSpi { // Constants protected static final int SIGN; protected static final int UNINITIALIZED; protected static final int VERIFY; // Variables protected int state; // Constructors protected Signature(String); // Class Methods public static Signature getInstance(String); public static Signature getInstance(String, String); // Instance Methods public Object clone( ); public final String getAlgorithm( ); public final Object getParameter(String); public final Provider getProvider( ); public final void initSign(PrivateKey); public final void initSign(PrivateKey, SecureRandom); public final void initVerify(PublicKey); public final void initVerify(Certificate); public final void setParameter(String, Object); public final void ...
Get Java Security, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.