Show / Hide Table of Contents

Class SoHash

Perform hashing of data, such as checksums, passwords etc. IMPORTANT - read Remarks for cross-dependency on the corresponding C++ code!

Inheritance
object
SoHash
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
Namespace: SuperOffice.Security.Cryptography
Assembly: SoCore.dll
Syntax
public class SoHash
Remarks

This class will take a dbtag (which should always be the CentralDbTag, not the own tag of the current DB), a primary key and a binary buffer, and produce a hash. Currently the algorithm is SHA1.

The code must be cross-checked with c:\CRM_Client\main.seven\Source\SUP\SoHash.cpp and PRODUCE THE EXACT SAME RESULT for the same inputs. Any changes must be made to both codebases and carefully checked; hashes made by one codebase will routinely be checked by the other and they have to match.

Constructors

SoHash(byte[])

Default constructor taking the DbTag as a byte array.

Declaration
public SoHash(byte[] dbTag)
Parameters
Type Name Description
byte[] dbTag

DbTag as a byte array

Remarks

This class will take a dbtag (which should always be the CentralDbTag, not the own tag of the current DB), a primary key and a binary buffer, and produce a hash. Currently the algorithm is SHA1.

The code must be cross-checked with c:\CRM_Client\main.seven\Source\SUP\SoHash.cpp and PRODUCE THE EXACT SAME RESULT for the same inputs. Any changes must be made to both codebases and carefully checked; hashes made by one codebase will routinely be checked by the other and they have to match.

SoHash(string)

Default constructor taking the DbTag in the format it is in the database.

Declaration
public SoHash(string dbTagString)
Parameters
Type Name Description
string dbTagString

DbTag as formatted in the database.

Remarks

This class will take a dbtag (which should always be the CentralDbTag, not the own tag of the current DB), a primary key and a binary buffer, and produce a hash. Currently the algorithm is SHA1.

The code must be cross-checked with c:\CRM_Client\main.seven\Source\SUP\SoHash.cpp and PRODUCE THE EXACT SAME RESULT for the same inputs. Any changes must be made to both codebases and carefully checked; hashes made by one codebase will routinely be checked by the other and they have to match.

Methods

HashData(int, byte[])

Create a private hash from the provided primary key and data

Declaration
public byte[] HashData(int primaryKey, byte[] data)
Parameters
Type Name Description
int primaryKey

Primary key of the row where the data is to reside.

byte[] data

Byte array to be hashed

Returns
Type Description
byte[]

Hash as a byte array.

Remarks

This class will take a dbtag (which should always be the CentralDbTag, not the own tag of the current DB), a primary key and a binary buffer, and produce a hash. Currently the algorithm is SHA1.

The code must be cross-checked with c:\CRM_Client\main.seven\Source\SUP\SoHash.cpp and PRODUCE THE EXACT SAME RESULT for the same inputs. Any changes must be made to both codebases and carefully checked; hashes made by one codebase will routinely be checked by the other and they have to match.

HashData(int, string)

Create a private hash from the provided primary key and data

Declaration
public byte[] HashData(int primaryKey, string data)
Parameters
Type Name Description
int primaryKey

Primary key of the row where the data is to reside.

string data

String to get a hash from.

Returns
Type Description
byte[]

Hash as a byte array.

Remarks

This class will take a dbtag (which should always be the CentralDbTag, not the own tag of the current DB), a primary key and a binary buffer, and produce a hash. Currently the algorithm is SHA1.

The code must be cross-checked with c:\CRM_Client\main.seven\Source\SUP\SoHash.cpp and PRODUCE THE EXACT SAME RESULT for the same inputs. Any changes must be made to both codebases and carefully checked; hashes made by one codebase will routinely be checked by the other and they have to match.

Extension Methods

EnumUtil.MapEnums<From, To>(From)
Converters.MapEnums<From, To>(From)
© SuperOffice. All rights reserved.
SuperOffice |  Community |  Release Notes |  Privacy |  Site feedback |  Search Docs |  About Docs |  Contribute |  Back to top