Inheritance: LongDigest
コード例 #1
0
        /**
         * Copy constructor.  This will copy the state of the provided
         * message digest.
         */
        public Sha512tDigest(Sha512tDigest t)
            : base(t)
        {
            this.digestLength = t.digestLength;

            Reset(t);
        }
コード例 #2
0
        /**
         * Copy constructor.  This will copy the state of the provided
         * message digest.
         */
        public Sha512tDigest(Sha512tDigest t)
            : base(t)
        {
            this.digestLength = t.digestLength;

			Reset(t);
        }
コード例 #3
0
 private static void UInt64_To_BE(ulong n, byte[] bs, int off, int max)
 {
     if (max > 0)
     {
         Sha512tDigest.UInt32_To_BE((uint)(n >> 32), bs, off, max);
         if (max > 4)
         {
             Sha512tDigest.UInt32_To_BE((uint)n, bs, off + 4, max - 4);
         }
     }
 }
コード例 #4
0
        /**
         * Copy constructor.  This will copy the state of the provided
         * message digest.
         */
        public Sha512tDigest(Sha512tDigest t)
            : base(t)
        {
            this.digestLength = t.digestLength;

            this.H1t = t.H1t;
            this.H2t = t.H2t;
            this.H3t = t.H3t;
            this.H4t = t.H4t;
            this.H5t = t.H5t;
            this.H6t = t.H6t;
            this.H7t = t.H7t;
            this.H8t = t.H8t;
        }
コード例 #5
0
ファイル: Sha512tDigest.cs プロジェクト: EnergonV/BestCS
        /**
         * Copy constructor.  This will copy the state of the provided
         * message digest.
         */
        public Sha512tDigest(Sha512tDigest t)
            : base(t)
        {
            this.digestLength = t.digestLength;

            this.H1t = t.H1t;
            this.H2t = t.H2t;
            this.H3t = t.H3t;
            this.H4t = t.H4t;
            this.H5t = t.H5t;
            this.H6t = t.H6t;
            this.H7t = t.H7t;
            this.H8t = t.H8t;
        }
コード例 #6
0
 public override int DoFinal(byte[] output, int outOff)
 {
     base.Finish();
     Sha512tDigest.UInt64_To_BE(this.H1, output, outOff, this.digestLength);
     Sha512tDigest.UInt64_To_BE(this.H2, output, outOff + 8, this.digestLength - 8);
     Sha512tDigest.UInt64_To_BE(this.H3, output, outOff + 16, this.digestLength - 16);
     Sha512tDigest.UInt64_To_BE(this.H4, output, outOff + 24, this.digestLength - 24);
     Sha512tDigest.UInt64_To_BE(this.H5, output, outOff + 32, this.digestLength - 32);
     Sha512tDigest.UInt64_To_BE(this.H6, output, outOff + 40, this.digestLength - 40);
     Sha512tDigest.UInt64_To_BE(this.H7, output, outOff + 48, this.digestLength - 48);
     Sha512tDigest.UInt64_To_BE(this.H8, output, outOff + 56, this.digestLength - 56);
     this.Reset();
     return(this.digestLength);
 }
コード例 #7
0
        public override void Reset(IMemoable other)
        {
            Sha512tDigest t = (Sha512tDigest)other;

            if (this.digestLength != t.digestLength)
            {
                throw new MemoableResetException("digestLength inappropriate in other");
            }
            base.CopyIn(t);
            this.H1t = t.H1t;
            this.H2t = t.H2t;
            this.H3t = t.H3t;
            this.H4t = t.H4t;
            this.H5t = t.H5t;
            this.H6t = t.H6t;
            this.H7t = t.H7t;
            this.H8t = t.H8t;
        }
コード例 #8
0
        public override void Reset(IMemoable other)
        {
            Sha512tDigest sha512tDigest = (Sha512tDigest)other;

            if (digestLength != sha512tDigest.digestLength)
            {
                throw new MemoableResetException("digestLength inappropriate in other");
            }
            CopyIn(sha512tDigest);
            H1t = sha512tDigest.H1t;
            H2t = sha512tDigest.H2t;
            H3t = sha512tDigest.H3t;
            H4t = sha512tDigest.H4t;
            H5t = sha512tDigest.H5t;
            H6t = sha512tDigest.H6t;
            H7t = sha512tDigest.H7t;
            H8t = sha512tDigest.H8t;
        }