public void Clear() { _bytes.Clear(); _computedIndex = -1; _checksum = 0; // note: original instance should collect with implicit dereference _murMur3 = new Murmur3_x86_32Digest(); }
private ChecksummedByteCollection(byte[][] aManyBytes) { _bytes = new List <byte[]>(); _computedIndex = -1; _checksum = 0; _murMur3 = new Murmur3_x86_32Digest(); AddRange(aManyBytes); }
public void Reset(IMemoable other) { Murmur3_x86_32Digest originalDigest = (Murmur3_x86_32Digest)other; Array.Copy(originalDigest._buffer, 0, _buffer, 0, _buffer.Length); _seed = originalDigest._seed; _h = originalDigest._h; _processedBytes = originalDigest._processedBytes; _idx = originalDigest._idx; }
public void AddRange(ChecksummedByteCollection aCollection) { if (_bytes.Count == 0) { // Is empty so just copy checksum from argument _computedIndex = aCollection._computedIndex; _checksum = aCollection.Checksum; _murMur3 = (Murmur3_x86_32Digest)aCollection._murMur3.Copy(); } _bytes.AddRange(aCollection._bytes); }
public RandomHashFast() { _murmurHash3 = new Murmur3_x86_32Digest(); _hashAlg[0] = Hashers.SHA2_256; _hashAlg[1] = Hashers.SHA2_384; _hashAlg[2] = Hashers.SHA2_512; _hashAlg[3] = Hashers.SHA3_256; _hashAlg[4] = Hashers.SHA3_384; _hashAlg[5] = Hashers.SHA3_512; _hashAlg[6] = Hashers.RIPEMD160; _hashAlg[7] = Hashers.RIPEMD256; _hashAlg[8] = Hashers.RIPEMD320; _hashAlg[9] = Hashers.BLAKE2B; _hashAlg[10] = Hashers.BLAKE2S; _hashAlg[11] = Hashers.Tiger2_5_192; _hashAlg[12] = Hashers.Snefru8_256; _hashAlg[13] = Hashers.Grindahl512; _hashAlg[14] = Hashers.Haval5_256; _hashAlg[15] = Hashers.MD5; _hashAlg[16] = Hashers.RadioGatun32; _hashAlg[17] = Hashers.Whirlpool; }
/** * Copy constructor. This will copy the state of the provided * message digest. */ public Murmur3_x86_32Digest(Murmur3_x86_32Digest t) { Reset(t); }