UsernameToken.ComputePasswordDigest Method

Returns the SHA-1 hash for a nonce, a timestamp, and a password.

Namespace: Microsoft.Web.Services3.Security.Tokens
Assembly: Microsoft.Web.Services3 (in microsoft.web.services3.dll)

Usage

'Usage
Dim nonce() As Byte
Dim created As DateTime
Dim secret As String
Dim returnValue() As Byte
returnValue = UsernameToken.ComputePasswordDigest(nonce, created, secret)

Syntax

'Declaration
Public Shared Function ComputePasswordDigest( _
    ByVal nonce() As Byte, _
    ByVal created As DateTime, _
    ByVal secret As String _
) As Byte()
public static byte[] ComputePasswordDigest(
    byte[] nonce, 
    DateTime created, 
    string secret
);
public:
static array<unsigned char>^ ComputePasswordDigest(
    array<unsigned char>^ nonce,
    DateTime^ created,
    String^ secret
);
public static ubyte[] ComputePasswordDigest(
    ubyte[] nonce, 
    DateTime created, 
    System.String secret
);
public static function ComputePasswordDigest(
     nonce : Byte[], 
     created : DateTime, 
     secret : String
) : Byte[];

Parameters

  • nonce
    An array of type Byte containing a nonce value.
  • created
    A DateTime specifying a timestamp.
  • secret
    A password.

Return Value

An array of type Byte containing the SHA-1 digest for a nonce, a timestamp, and a password.

Remarks

Typically, the ComputePasswordDigest method is only called by WSE. WSE uses the ComputePasswordDigest method for outgoing SOAP messages. To get the value of the SHA-1 hash for an incoming SOAP message, use the PasswordDigest property.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Platforms

Development Platforms

Windows XP Home Edition, Windows XP Professional, Windows Server 2003, Windows 2000, Windows 2000 Server, Windows 2000 Advanced Server

Target Platforms

See Also

Reference

UsernameToken Class
UsernameToken Members
Microsoft.Web.Services3.Security.Tokens Namespace