Class HTTPDigest
Inheritance
System.Object
HTTPDigest
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: SIPSorcery.SIP
Assembly: SIPSorcery.dll
Syntax
public class HTTPDigest
Methods
| Improve this Doc View SourceDigestCalcHA1(String, String, String, DigestAlgorithmsEnum)
Calculate H(A1) as per HTTP Digest specification.
Declaration
public static string DigestCalcHA1(string username, string realm, string password, DigestAlgorithmsEnum hashAlg = DigestAlgorithmsEnum.MD5)
Parameters
Type | Name | Description |
---|---|---|
System.String | username | |
System.String | realm | |
System.String | password | |
DigestAlgorithmsEnum | hashAlg |
Returns
Type | Description |
---|---|
System.String |
DigestCalcHA2(String, String, DigestAlgorithmsEnum)
Calculate H(A2) as per HTTP Digest specification.
Declaration
public static string DigestCalcHA2(string method, string uri, DigestAlgorithmsEnum hashAlg = DigestAlgorithmsEnum.MD5)
Parameters
Type | Name | Description |
---|---|---|
System.String | method | |
System.String | uri | |
DigestAlgorithmsEnum | hashAlg |
Returns
Type | Description |
---|---|
System.String |
DigestCalcResponse(String, String, String, String, String, String, String, DigestAlgorithmsEnum)
Declaration
public static string DigestCalcResponse(string ha1, string uri, string nonce, string nonceCount, string cnonce, string qop, string method, DigestAlgorithmsEnum hashAlg = DigestAlgorithmsEnum.MD5)
Parameters
Type | Name | Description |
---|---|---|
System.String | ha1 | |
System.String | uri | |
System.String | nonce | |
System.String | nonceCount | |
System.String | cnonce | |
System.String | qop | |
System.String | method | |
DigestAlgorithmsEnum | hashAlg |
Returns
Type | Description |
---|---|
System.String |
DigestCalcResponse(String, String, String, String, String, String, String, String, String, DigestAlgorithmsEnum)
Declaration
public static string DigestCalcResponse(string username, string realm, string password, string uri, string nonce, string nonceCount, string cnonce, string qop, string method, DigestAlgorithmsEnum hashAlg = DigestAlgorithmsEnum.MD5)
Parameters
Type | Name | Description |
---|---|---|
System.String | username | |
System.String | realm | |
System.String | password | |
System.String | uri | |
System.String | nonce | |
System.String | nonceCount | |
System.String | cnonce | |
System.String | qop | |
System.String | method | |
DigestAlgorithmsEnum | hashAlg |
Returns
Type | Description |
---|---|
System.String |
GetHashHex(DigestAlgorithmsEnum, String)
Declaration
public static string GetHashHex(DigestAlgorithmsEnum hashAlg, string val)
Parameters
Type | Name | Description |
---|---|---|
DigestAlgorithmsEnum | hashAlg | |
System.String | val |
Returns
Type | Description |
---|---|
System.String |