Class OldAuth
Calculates hash values for data using the old login-system checks.
Inheritance
Inherited Members
Namespace: MBNCSUtil
Assembly: MBNCSUtil.dll
Syntax
[ComVisible(false)]
public sealed class OldAuth
Remarks
This method of logon would be used in down-level clients using the SID_CLIENTID, SID_CLIENTID2, or SID_AUTH_INFO messages specifying the login style 0 (Old login system).
Methods
| Improve this Doc View SourceDoubleHashData(Byte[], Int32, Int32)
Calculates the double-pass "broken" SHA-1 hash of the specified data.
Declaration
public static byte[] DoubleHashData(byte[] data, int clientToken, int serverToken)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | data | The data buffer to hash. |
System.Int32 | clientToken | The client token, a randomly-generated value specified by the client. |
System.Int32 | serverToken | The server token, a randomly-generated value specified by the server. |
Returns
Type | Description |
---|---|
System.Byte[] | A 20-byte buffer containing the hash value. |
DoubleHashData(Byte[], UInt32, UInt32)
Calculates the double-pass "broken" SHA-1 hash of the specified data. This method is not CLS-compliant.
Declaration
[CLSCompliant(false)]
public static byte[] DoubleHashData(byte[] data, uint clientToken, uint serverToken)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | data | The data buffer to hash. |
System.UInt32 | clientToken | The client token, a randomly-generated value specified by the client. |
System.UInt32 | serverToken | The server token, a randomly-generated value specified by the server. |
Returns
Type | Description |
---|---|
System.Byte[] | A 20-byte buffer containing the hash value. |
DoubleHashPassword(String, Int32, Int32)
Calculates the double-pass "broken" SHA-1 hash of the specified password using ASCII encoding.
Declaration
public static byte[] DoubleHashPassword(string data, int clientToken, int serverToken)
Parameters
Type | Name | Description |
---|---|---|
System.String | data | The password to hash. |
System.Int32 | clientToken | The client token, a randomly-generated value specified by the client. |
System.Int32 | serverToken | The server token, a randomly-generated value specified by the server. |
Returns
Type | Description |
---|---|
System.Byte[] | A 20-byte buffer containing the hash value. |
DoubleHashPassword(String, UInt32, UInt32)
Calculates the double-pass "broken" SHA-1 hash of the specified password using ASCII encoding. This method is not CLS-compliant.
Declaration
[CLSCompliant(false)]
public static byte[] DoubleHashPassword(string data, uint clientToken, uint serverToken)
Parameters
Type | Name | Description |
---|---|---|
System.String | data | The password to hash. |
System.UInt32 | clientToken | The client token, a randomly-generated value specified by the client. |
System.UInt32 | serverToken | The server token, a randomly-generated value specified by the server. |
Returns
Type | Description |
---|---|
System.Byte[] | A 20-byte buffer containing the hash value. |
HashData(Byte[])
Calculates the single "broken" SHA-1 hash of the specified data.
Declaration
public static byte[] HashData(byte[] data)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | data | The data buffer to hash. |
Returns
Type | Description |
---|---|
System.Byte[] | A 20-byte buffer containing the hash value. |
HashPassword(String)
Calculates the single "broken" SHA-1 hash of the specified password using ASCII encoding.
Declaration
public static byte[] HashPassword(string data)
Parameters
Type | Name | Description |
---|---|---|
System.String | data | The password to hash. |
Returns
Type | Description |
---|---|
System.Byte[] | A 20-byte buffer containing the hash value. |