UsernameToken.ComputePasswordDigest Method
Returns the SHA-1 hash for a nonce, a timestamp, and a password.
Namespace: Microsoft.Web.Services2.Security.Tokens
Assembly: Microsoft.Web.Services2 (in microsoft.web.services2.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<Byte>^ ComputePasswordDigest(
array<Byte>^ 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 System.Byte containing a nonce value.
- created
A System.DateTime specifying a timestamp.
- secret
A password.
Return Value
An array of type System.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 Longhorn, and Windows 2000
Target Platforms
Windows 2000, Windows 2000 Server, Windows 2000 Advanced Server, Windows XP Home Edition, Windows XP Professional, Windows Server 2003, Windows Longhorn, Pocket PC, Windows CE, Smart Phone
See Also
Reference
UsernameToken Class
Microsoft.Web.Services2.Security.Tokens Namespace