次の方法で共有


Signature.Sign Method

Definition

Overloads

Sign()

Returns the signature bytes of all the data updated.

Sign(Byte[], Int32, Int32)

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

Sign()

Returns the signature bytes of all the data updated.

[Android.Runtime.Register("sign", "()[B", "")]
public byte[]? Sign ();
[<Android.Runtime.Register("sign", "()[B", "")>]
member this.Sign : unit -> byte[]

Returns

Byte[]

the signature bytes of the signing operation's result.

Attributes

Exceptions

if this Signature instance is not initialized properly.

Remarks

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

A call to this method resets this signature object to the state it was in when previously initialized for signing via a call to initSign(PrivateKey). That is, the object is reset and available to generate another signature from the same signer, if desired, via new calls to update and sign.

Java documentation for java.security.Signature.sign().

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

Sign(Byte[], Int32, Int32)

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

[Android.Runtime.Register("sign", "([BII)I", "")]
public int Sign (byte[]? outbuf, int offset, int len);
[<Android.Runtime.Register("sign", "([BII)I", "")>]
member this.Sign : 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.

Returns

the number of bytes placed into outbuf.

Attributes

Exceptions

if this Signature instance is not initialized properly.

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

Remarks

Finishes the 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.

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

Added in 1.2.

Java documentation for java.security.Signature.sign(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