Android Guides | Samples

Java.Security.Signature Class

Signature is an engine class which is capable of creating and verifying digital signatures, using different algorithms that have been registered with the Security class.

See Also: Signature

Syntax

[Android.Runtime.Register("java/security/Signature", DoNotGenerateAcw=true)]
public abstract class Signature : SignatureSpi

Remarks

Signature is an engine class which is capable of creating and verifying digital signatures, using different algorithms that have been registered with the Security class.

See Also

[Android Documentation]

Requirements

Namespace: Java.Security
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1

The members of Java.Security.Signature are listed below.

See Also: SignatureSpi

Protected Constructors

Constructs a new instance of Signature with the name of the algorithm to use.
A constructor used when creating managed representations of JNI objects; called by the runtime.

Protected Fields

const
UninitializedSignatureState (0). Constant that indicates that this Signature instance has not yet been initialized.

Public Properties

[read-only]
AlgorithmString. Returns the name of the algorithm of this Signature.
[read-only]
ParametersAlgorithmParameters. Returns the AlgorithmParameters of this Signature instance.
[read-only]
ProviderProvider. Returns the provider associated with this Signature.

Protected Properties

StateSignatureState. Represents the current state of this Signature.
[read-only]
override
ThresholdClassIntPtr. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.
[read-only]
override
ThresholdTypeType. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

Public Methods

static
GetInstance(String) : Signature
Returns a new instance of Signature that utilizes the specified algorithm.
static
GetInstance(String, Provider) : Signature
Returns a new instance of Signature that utilizes the specified algorithm from the specified provider.
static
GetInstance(String, String) : Signature
Returns a new instance of Signature that utilizes the specified algorithm from the specified provider.
GetParameter(String) : Object
Returns the value of the parameter with the specified name.
InitSign(IPrivateKey)
Initializes this Signature instance for signing, using the private key of the identity whose signature is going to be generated.
InitSign(IPrivateKey, SecureRandom)
Initializes this Signature instance for signing, using the private key of the identity whose signature is going to be generated and the specified source of randomness.
InitVerify(Certificate)
Initializes this Signature instance for signature verification, using the certificate of the identity whose signature is going to be verified.
InitVerify(IPublicKey)
Initializes this Signature instance for signature verification, using the public key of the identity whose signature is going to be verified.
SetParameter(IAlgorithmParameterSpec)
Sets the specified AlgorithmParameterSpec.
SetParameter(String, Object)
Sets the specified parameter to the given value.
Sign() : Byte[]
Generates and returns the signature of all updated data.
Sign(Byte[], Int32, Int32) : Int32
Generates and stores the signature of all updated data in the provided byte[] at the specified position with the specified length.
Update(ByteBuffer)
Updates the data to be verified or to be signed, using the specified ByteBuffer.
Update(Byte[])
Updates the data to be verified or to be signed, using the specified byte[].
Update(SByte)
Updates the data to be verified or to be signed, using the specified byte.
Update(Byte[], Int32, Int32)
Updates the data to be verified or to be signed, using the given byte[], starting form the specified index for the specified length.
Verify(Byte[]) : Boolean
Indicates whether the given signature can be verified using the public key or a certificate of the signer.
Verify(Byte[], Int32, Int32) : Boolean
Indicates whether the given signature starting at index offset with length bytes can be verified using the public key or a certificate of the signer.