TeamFoundationSigningService.Sign Method (TeamFoundationRequestContext, Guid, array<Byte , TimeSpan, SigningAlgorithm)
Sign the given message using the key set for the given identifier. The message will fail to validate after the given expiration timespan.
Namespace: Microsoft.TeamFoundation.Framework.Server
Assembly: Microsoft.TeamFoundation.Framework.Server (in Microsoft.TeamFoundation.Framework.Server.dll)
Syntax
'Declaration
Public Function Sign ( _
requestContext As TeamFoundationRequestContext, _
identifier As Guid, _
message As Byte(), _
expiration As TimeSpan, _
algorithm As SigningAlgorithm _
) As String
public string Sign(
TeamFoundationRequestContext requestContext,
Guid identifier,
byte[] message,
TimeSpan expiration,
SigningAlgorithm algorithm
)
public:
String^ Sign(
TeamFoundationRequestContext^ requestContext,
Guid identifier,
array<unsigned char>^ message,
TimeSpan expiration,
SigningAlgorithm algorithm
)
member Sign :
requestContext:TeamFoundationRequestContext *
identifier:Guid *
message:byte[] *
expiration:TimeSpan *
algorithm:SigningAlgorithm -> string
public function Sign(
requestContext : TeamFoundationRequestContext,
identifier : Guid,
message : byte[],
expiration : TimeSpan,
algorithm : SigningAlgorithm
) : String
Parameters
requestContext
Type: Microsoft.TeamFoundation.Framework.Server.TeamFoundationRequestContextThe request context
identifier
Type: System.GuidThe identifier of the key set
message
Type: array<System.Byte[]The message to sign
expiration
Type: System.TimeSpanThe length of time for which the signed message can be validated. Pass TimeSpan.Zero for no expiration
algorithm
Type: Microsoft.TeamFoundation.Framework.Server.SigningAlgorithmThe SigningAlgorithm to use [Default: SHA1]
Return Value
Type: System.String
Returns the signed message
.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.