加载中...
The Wayback Machine - https://sup1a9wrlpyh5li9ro.vcoronado.top/web/20090326194412/http://developer.android.com:80/reference/java/security/Signature.html
public abstract class

Signature

extends SignatureSpi
java.lang.Object
   ↳ java.security.SignatureSpi
     ↳ java.security.Signature

Summary

Constants
int SIGN
int UNINITIALIZED
int VERIFY
Fields
protected int state
[Expand]
Inherited Fields
From class java.security.SignatureSpi
Protected Constructors
Signature(String algorithm)
Public Methods
Object clone()
Returns a new instance of the same class as the receiver, whose slots have been filled in with the values in the slots of the receiver.
final String getAlgorithm()
static Signature getInstance(String algorithm, String provider)
static Signature getInstance(String algorithm)
static Signature getInstance(String algorithm, Provider provider)
final Object getParameter(String param)
This method is deprecated. There is no generally accepted parameter naming convention.
final AlgorithmParameters getParameters()
final Provider getProvider()
final void initSign(PrivateKey privateKey)
final void initSign(PrivateKey privateKey, SecureRandom random)
final void initVerify(PublicKey publicKey)
final void initVerify(Certificate certificate)
final void setParameter(String param, Object value)
This method is deprecated. Use setParameter
final void setParameter(AlgorithmParameterSpec params)
final byte[] sign()
final int sign(byte[] outbuf, int offset, int len)
String toString()
Returns a string containing a concise, human-readable description of the receiver.
final void update(byte[] data)
final void update(byte b)
final void update(byte[] data, int off, int len)
final void update(ByteBuffer data)
final boolean verify(byte[] signature)
final boolean verify(byte[] signature, int offset, int length)
[Expand]
Inherited Methods
From class java.security.SignatureSpi
From class java.lang.Object

Constants

protected static final int SIGN

Constant Value: 2 (0x00000002)

protected static final int UNINITIALIZED

Constant Value: 0 (0x00000000)

protected static final int VERIFY

Constant Value: 3 (0x00000003)

Fields

protected int state

Protected Constructors

protected Signature (String algorithm)

Public Methods

public Object clone ()

Returns a new instance of the same class as the receiver, whose slots have been filled in with the values in the slots of the receiver.

Classes which wish to support cloning must specify that they implement the Cloneable interface, since the implementation checks for this.

Returns
  • Object a shallow copy of this object.

public final String getAlgorithm ()

public static Signature getInstance (String algorithm, String provider)

public static Signature getInstance (String algorithm)

public static Signature getInstance (String algorithm, Provider provider)

public final Object getParameter (String param)

This method is deprecated.There is no generally accepted parameter naming convention.

@com.intel.drl.spec_ref

public final AlgorithmParameters getParameters ()

public final Provider getProvider ()

public final void initSign (PrivateKey privateKey)

public final void initSign (PrivateKey privateKey, SecureRandom random)

public final void initVerify (PublicKey publicKey)

public final void initVerify (Certificate certificate)

public final void setParameter (String param, Object value)

This method is deprecated.Use setParameter

@com.intel.drl.spec_ref

public final void setParameter (AlgorithmParameterSpec params)

public final byte[] sign ()

public final int sign (byte[] outbuf, int offset, int len)

public String toString ()

Returns a string containing a concise, human-readable description of the receiver.

Returns
  • String a printable representation for the receiver.

public final void update (byte[] data)

public final void update (byte b)

public final void update (byte[] data, int off, int len)

public final void update (ByteBuffer data)

public final boolean verify (byte[] signature)

public final boolean verify (byte[] signature, int offset, int length)