public TupleHash(TupleHash original) { this.cshake = new CShakeDigest(original.cshake); this.bitLength = cshake.fixedOutputLength; this.outputLength = bitLength * 2 / 8; this.firstOutput = original.firstOutput; }
public TupleHash(int bitLength, byte[] S, int outputSize) { this.cshake = new CShakeDigest(bitLength, N_TUPLE_HASH, S); this.bitLength = bitLength; this.outputLength = (outputSize + 7) / 8; Reset(); }
public ParallelHash(ParallelHash source) { this.cshake = new CShakeDigest(source.cshake); this.compressor = new CShakeDigest(source.compressor); this.bitLength = source.bitLength; this.B = source.B; this.outputLength = source.outputLength; this.buffer = Arrays.Clone(source.buffer); this.compressorBuffer = Arrays.Clone(source.compressorBuffer); }
public ParallelHash(int bitLength, byte[] S, int B, int outputSize) { this.cshake = new CShakeDigest(bitLength, N_PARALLEL_HASH, S); this.compressor = new CShakeDigest(bitLength, new byte[0], new byte[0]); this.bitLength = bitLength; this.B = B; this.outputLength = (outputSize + 7) / 8; this.buffer = new byte[B]; this.compressorBuffer = new byte[bitLength * 2 / 8]; Reset(); }
public CShakeDigest(CShakeDigest source) : base(source) { this.diff = Arrays.Clone(source.diff); }