Struct ObjectIdSimpleBuilder
An optimized version of ObjectIdBuilder to output a ObjectId expecting data to hash be 32bits integers only. See remarks.
public struct ObjectIdSimpleBuilder
- Inherited Members
Remarks
This implementation is suited when it can be feeded with 32bits values. The resulting value must be identical to ObjectIdBuilder if the length size of the data is a multiple of 16 bytes.
Constructors
ObjectIdSimpleBuilder(uint)
public ObjectIdSimpleBuilder(uint seed = 0)
Parameters
seeduint
Properties
Length
public uint Length { get; }
Property Value
Seed
public uint Seed { get; }
Property Value
Methods
ComputeHash()
Gets the current calculated hash.
public ObjectId ComputeHash()
Returns
- ObjectId
The current hash.
ComputeHash(out ObjectId)
Gets the current calculated hash.
public void ComputeHash(out ObjectId result)
Parameters
resultObjectId
Reset()
public void Reset()
Write(int)
public void Write(int data)
Parameters
dataint
Write(uint)
public void Write(uint data)
Parameters
datauint
Write<T>(T)
Writes the specified data to this builder. Size of data must be multiple of 4 bytes.
public void Write<T>(T data) where T : struct
Parameters
dataTThe data to add to this builder
Type Parameters
TStruct type with a size multiple of 4 bytes