Share via


SymmetricSignatureProvider.Sign Method

Produces a signature over the 'input' using the SymmetricSecurityKey and 'algorithm' passed to SymmetricSignatureProvider.

Namespace:  System.IdentityModel.Tokens
Assembly:  System.IdentityModel.Tokens.Jwt (in System.IdentityModel.Tokens.Jwt.dll)

Syntax

'Declaration
Public Overrides Function Sign ( _
    input As Byte() _
) As Byte()
public override byte[] Sign(
    byte[] input
)
public:
virtual array<unsigned char>^ Sign(
    array<unsigned char>^ input
) override
abstract Sign : 
        input:byte[] -> byte[] 
override Sign : 
        input:byte[] -> byte[] 
public override function Sign(
    input : byte[]
) : byte[]

Parameters

Return Value

Type: System.Byte[]
signed bytes

Exceptions

Exception Condition
ArgumentNullException

'input' is null.

ArgumentException

'input.Length' == 0.

ObjectDisposedException

Dispose has been called.

InvalidOperationException

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

.NET Framework Security

See Also

Reference

SymmetricSignatureProvider Class

System.IdentityModel.Tokens Namespace