Udostępnij za pośrednictwem


SymmetricSignatureProvider.Sign Method

Definition

Overloads

Sign(Byte[])

Produces a signature over the 'input' using the SymmetricSecurityKey and 'algorithm' passed to SymmetricSignatureProvider(SecurityKey, String).

Sign(Byte[], Int32, Int32)

Produces a signature over the specified region of the input.

Sign(ReadOnlySpan<Byte>, Span<Byte>, Int32)

Produces a signature over the data and writes it to destination.

Sign(Byte[])

Produces a signature over the 'input' using the SymmetricSecurityKey and 'algorithm' passed to SymmetricSignatureProvider(SecurityKey, String).

public override byte[] Sign (byte[] input);
override this.Sign : byte[] -> byte[]
Public Overrides Function Sign (input As Byte()) As Byte()

Parameters

input
Byte[]

The bytes to sign.

Returns

Byte[]

Signed bytes

Exceptions

'input' is null.

'input.Length' == 0.

KeyedHashAlgorithm is null. This can occur if a derived type deletes it or does not create it.

Remarks

Sign is thread safe.

Applies to

Sign(Byte[], Int32, Int32)

Produces a signature over the specified region of the input.

public override byte[] Sign (byte[] input, int offset, int count);
override this.Sign : byte[] * int * int -> byte[]
Public Overrides Function Sign (input As Byte(), offset As Integer, count As Integer) As Byte()

Parameters

input
Byte[]

The bytes to produce a signature over.

offset
Int32

The offset to specify the beginning of the region.

count
Int32

The count to specify the end of the region.

Returns

Byte[]

The signature bytes.

Applies to

Sign(ReadOnlySpan<Byte>, Span<Byte>, Int32)

Produces a signature over the data and writes it to destination.

public override bool Sign (ReadOnlySpan<byte> input, Span<byte> signature, out int bytesWritten);
override this.Sign : ReadOnlySpan<byte> * Span<byte> * int -> bool
Public Overrides Function Sign (input As ReadOnlySpan(Of Byte), signature As Span(Of Byte), ByRef bytesWritten As Integer) As Boolean

Parameters

signature
Span<Byte>
bytesWritten
Int32

The number of bytes written into the signature span.

Returns

returns true if creation of signature succeeded, false otherwise.

Applies to