Inheritance: GeneralDigest
示例#1
0
        public static byte[] GetMd5Bytes(byte[] data) {
            MD5Digest digest = new MD5Digest();
            digest.BlockUpdate(data, 0, data.Length);
            byte[] hash = new byte[16];
            digest.DoFinal(hash, 0);

            return hash;
        }
示例#2
0
        public static byte[] GetMd5Bytes(byte[] data)
        {
            MD5Digest digest = new MD5Digest();

            digest.BlockUpdate(data, 0, data.Length);
            byte[] hash = new byte[16];
            digest.DoFinal(hash, 0);

            return(hash);
        }
示例#3
0
        /**
         * Copy constructor. This will copy the state of the provided
         * message digest.
         */

        public MD5Digest(MD5Digest t)
            : base(t)
        {
            H1 = t.H1;
            H2 = t.H2;
            H3 = t.H3;
            H4 = t.H4;

            Array.Copy(t.X, 0, X, 0, t.X.Length);
            xOff = t.xOff;
        }
示例#4
0
        /**
         * Copy constructor. This will copy the state of the provided
         * message digest.
         */

        public MD5Digest(MD5Digest t)
            : base(t)
        {
            this.H1 = t.H1;
            this.H2 = t.H2;
            this.H3 = t.H3;
            this.H4 = t.H4;

            Array.Copy(t.X, 0, this.X, 0, t.X.Length);
            this.xOff = t.xOff;
        }
示例#5
0
        /**
        * Copy constructor. This will copy the state of the provided
        * message digest.
        */
        public MD5Digest(MD5Digest t)
            : base(t)
        {
            H1 = t.H1;
            H2 = t.H2;
            H3 = t.H3;
            H4 = t.H4;

            Array.Copy(t.X, 0, X, 0, t.X.Length);
            xOff = t.xOff;
        }