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
input
Type: System.Byte[]bytes to sign.
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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.