SignatureSpi.EngineSign Method

Definition

Overloads

EngineSign()

Returns the signature bytes of all the data updated so far.

EngineSign(Byte[], Int32, Int32)

Finishes this signature operation and stores the resulting signature bytes in the provided buffer outbuf, starting at offset.

EngineSign()

Returns the signature bytes of all the data updated so far.

[Android.Runtime.Register("engineSign", "()[B", "GetEngineSignHandler")]
protected abstract byte[]? EngineSign ();
[<Android.Runtime.Register("engineSign", "()[B", "GetEngineSignHandler")>]
abstract member EngineSign : unit -> byte[]

Returns

Byte[]

the signature bytes of the signing operation's result.

Attributes

Exceptions

if this SignatureSpi instance is not initialized properly.

Remarks

Returns the signature bytes of all the data updated so far. The format of the signature depends on the underlying signature scheme.

Java documentation for java.security.SignatureSpi.engineSign().

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

EngineSign(Byte[], Int32, Int32)

Finishes this signature operation and stores the resulting signature bytes in the provided buffer outbuf, starting at offset.

[Android.Runtime.Register("engineSign", "([BII)I", "GetEngineSign_arrayBIIHandler")]
protected virtual int EngineSign (byte[]? outbuf, int offset, int len);
[<Android.Runtime.Register("engineSign", "([BII)I", "GetEngineSign_arrayBIIHandler")>]
abstract member EngineSign : byte[] * int * int -> int
override this.EngineSign : byte[] * int * int -> int

Parameters

outbuf
Byte[]

buffer for the signature result.

offset
Int32

offset into outbuf where the signature is stored.

len
Int32

number of bytes within outbuf allotted for the signature. Both this default implementation and the SUN provider do not return partial digests. If the value of this parameter is less than the actual signature length, this method will throw a SignatureException. This parameter is ignored if its value is greater than or equal to the actual signature length.

Returns

the number of bytes placed into outbuf

Attributes

Exceptions

if this SignatureSpi instance is not initialized properly.

if offset or len are not valid in respect to outbuf.

Remarks

Finishes this signature operation and stores the resulting signature bytes in the provided buffer outbuf, starting at offset. The format of the signature depends on the underlying signature scheme.

The signature implementation is reset to its initial state (the state it was in after a call to one of the engineInitSign methods) and can be reused to generate further signatures with the same private key.

This method should be abstract, but we leave it concrete for binary compatibility. Knowledgeable providers should override this method.

Added in 1.2.

Java documentation for java.security.SignatureSpi.engineSign(byte[], int, int).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to