예제 #1
0
 public TupleHash(TupleHash original)
 {
     this.cshake       = new CShakeDigest(original.cshake);
     this.bitLength    = cshake.fixedOutputLength;
     this.outputLength = bitLength * 2 / 8;
     this.firstOutput  = original.firstOutput;
 }
예제 #2
0
        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();
        }
예제 #3
0
 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);
 }
예제 #4
0
        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();
        }
예제 #5
0
 public CShakeDigest(CShakeDigest source)
     : base(source)
 {
     this.diff = Arrays.Clone(source.diff);
 }