AsymmetricSignatureProvider.Sign Method
Produces a signature over input using the AsymmetricSecurityKey and an algorithm passed to AsymmetricSignatureProvider.
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 be signed.
Return Value
Type: System.Byte[]
Returns a signature from input.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | input is null. |
ArgumentException | The length of input is zero. |
ObjectDisposedException | If Dispose has been called. |
InvalidOperationException |
|
.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.