DigestAuthFunctions
Assembly: ServiceStack.dll
View Source
Declaration
public class DigestAuthFunctions
Methods
PrivateHashEncode(String, String, String)
View Source
Declaration
public string PrivateHashEncode(string TimeStamp, string IPAddress, string PrivateKey)
Returns
System.String
Parameters
Type | Name |
---|---|
System.String | TimeStamp |
System.String | IPAddress |
System.String | PrivateKey |
Base64Encode(String)
View Source
Declaration
public string Base64Encode(string StringToEncode)
Returns
System.String
Parameters
Type | Name |
---|---|
System.String | StringToEncode |
Base64Decode(String)
View Source
Declaration
public string Base64Decode(string StringToDecode)
Returns
System.String
Parameters
Type | Name |
---|---|
System.String | StringToDecode |
GetNonceParts(String)
View Source
Declaration
public string[] GetNonceParts(string nonce)
Returns
System.String[]
Parameters
Type | Name |
---|---|
System.String | nonce |
GetNonce(String, String)
View Source
Declaration
public string GetNonce(string IPAddress, string PrivateKey)
Returns
System.String
Parameters
Type | Name |
---|---|
System.String | IPAddress |
System.String | PrivateKey |
ValidateNonce(String, String, String)
View Source
Declaration
public bool ValidateNonce(string nonce, string IPAddress, string PrivateKey)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
System.String | nonce |
System.String | IPAddress |
System.String | PrivateKey |
StaleNonce(String, Int32)
View Source
Declaration
public bool StaleNonce(string nonce, int Timeout)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
System.String | nonce |
System.Int32 | Timeout |
ConvertToHexString(IEnumerable<Byte>)
View Source
Declaration
public string ConvertToHexString(IEnumerable<byte> hash)
Returns
System.String
Parameters
Type | Name |
---|---|
System.Collections.Generic.IEnumerable<System.Byte> | hash |
CreateAuthResponse(Dictionary<String, String>, String)
View Source
Declaration
public string CreateAuthResponse(Dictionary<string, string> digestHeaders, string Ha1)
Returns
System.String
Parameters
Type | Name |
---|---|
System.Collections.Generic.Dictionary<System.String,System.String> | digestHeaders |
System.String | Ha1 |
CreateAuthResponse(Dictionary<String, String>, String, String)
View Source
Declaration
public string CreateAuthResponse(Dictionary<string, string> digestHeaders, string Ha1, string Ha2)
Returns
System.String
Parameters
Type | Name |
---|---|
System.Collections.Generic.Dictionary<System.String,System.String> | digestHeaders |
System.String | Ha1 |
System.String | Ha2 |
CreateHa1(Dictionary<String, String>, String)
View Source
Declaration
public string CreateHa1(Dictionary<string, string> digestHeaders, string password)
Returns
System.String
Parameters
Type | Name |
---|---|
System.Collections.Generic.Dictionary<System.String,System.String> | digestHeaders |
System.String | password |
CreateHa1(String, String, String)
View Source
Declaration
public string CreateHa1(string Username, string Realm, string Password)
Returns
System.String
Parameters
Type | Name |
---|---|
System.String | Username |
System.String | Realm |
System.String | Password |
CreateHa2(Dictionary<String, String>)
View Source
Declaration
public string CreateHa2(Dictionary<string, string> digestHeaders)
Returns
System.String
Parameters
Type | Name |
---|---|
System.Collections.Generic.Dictionary<System.String,System.String> | digestHeaders |
ValidateResponse(Dictionary<String, String>, String, Int32, String, String)
View Source
Declaration
public bool ValidateResponse(Dictionary<string, string> digestInfo, string PrivateKey, int NonceTimeOut, string DigestHA1, string sequence)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
System.Collections.Generic.Dictionary<System.String,System.String> | digestInfo |
System.String | PrivateKey |
System.Int32 | NonceTimeOut |
System.String | DigestHA1 |
System.String | sequence |