private byte[] _EndHash() { byte[] block = new byte[20]; int length = 64 - (int)(this._count & 63L); if (length <= 8) { length += 64; } byte[] partIn = new byte[length]; partIn[0] = (byte)128; long num = this._count * 8L; partIn[length - 1] = (byte)((ulong)(num >> 56) & (ulong)byte.MaxValue); partIn[length - 2] = (byte)((ulong)(num >> 48) & (ulong)byte.MaxValue); partIn[length - 3] = (byte)((ulong)(num >> 40) & (ulong)byte.MaxValue); partIn[length - 4] = (byte)((ulong)(num >> 32) & (ulong)byte.MaxValue); partIn[length - 5] = (byte)((ulong)(num >> 24) & (ulong)byte.MaxValue); partIn[length - 6] = (byte)((ulong)(num >> 16) & (ulong)byte.MaxValue); partIn[length - 7] = (byte)((ulong)(num >> 8) & (ulong)byte.MaxValue); partIn[length - 8] = (byte)((ulong)num & (ulong)byte.MaxValue); this._HashData(partIn, 0, partIn.Length); Utils.DWORDToLittleEndian(block, this._stateMD160, 5); this.HashValue = block; return(block); }
private byte[] _EndHash() { byte[] block = new byte[20]; int num = 0x40 - ((int)(this._count & 0x3fL)); if (num <= 8) { num += 0x40; } byte[] partIn = new byte[num]; partIn[0] = 0x80; long num2 = this._count * 8L; partIn[num - 1] = (byte)((num2 >> 0x38) & 0xffL); partIn[num - 2] = (byte)((num2 >> 0x30) & 0xffL); partIn[num - 3] = (byte)((num2 >> 40) & 0xffL); partIn[num - 4] = (byte)((num2 >> 0x20) & 0xffL); partIn[num - 5] = (byte)((num2 >> 0x18) & 0xffL); partIn[num - 6] = (byte)((num2 >> 0x10) & 0xffL); partIn[num - 7] = (byte)((num2 >> 8) & 0xffL); partIn[num - 8] = (byte)(num2 & 0xffL); this._HashData(partIn, 0, partIn.Length); Utils.DWORDToLittleEndian(block, this._stateMD160, 5); base.HashValue = block; return(block); }
private byte[] _EndHash() { byte[] array = new byte[20]; int num = 64 - (int)(this._count & 63L); if (num <= 8) { num += 64; } byte[] array2 = new byte[num]; array2[0] = 128; long num2 = this._count * 8L; array2[num - 1] = (byte)(num2 >> 56 & 255L); array2[num - 2] = (byte)(num2 >> 48 & 255L); array2[num - 3] = (byte)(num2 >> 40 & 255L); array2[num - 4] = (byte)(num2 >> 32 & 255L); array2[num - 5] = (byte)(num2 >> 24 & 255L); array2[num - 6] = (byte)(num2 >> 16 & 255L); array2[num - 7] = (byte)(num2 >> 8 & 255L); array2[num - 8] = (byte)(num2 & 255L); this._HashData(array2, 0, array2.Length); Utils.DWORDToLittleEndian(array, this._stateMD160, 5); this.HashValue = array; return(array); }
[System.Security.SecurityCritical] // auto-generated private byte[] _EndHash() { byte[] pad; int padLen; long bitCount; byte[] hash = new byte[20]; /* Compute padding: 80 00 00 ... 00 00 <bit count> */ padLen = 64 - (int)(_count & 0x3f); if (padLen <= 8) { padLen += 64; } pad = new byte[padLen]; pad[0] = 0x80; // Convert count to bit count bitCount = _count * 8; // The convention for RIPEMD is little endian (the same as MD4) pad[padLen - 1] = (byte)((bitCount >> 56) & 0xff); pad[padLen - 2] = (byte)((bitCount >> 48) & 0xff); pad[padLen - 3] = (byte)((bitCount >> 40) & 0xff); pad[padLen - 4] = (byte)((bitCount >> 32) & 0xff); pad[padLen - 5] = (byte)((bitCount >> 24) & 0xff); pad[padLen - 6] = (byte)((bitCount >> 16) & 0xff); pad[padLen - 7] = (byte)((bitCount >> 8) & 0xff); pad[padLen - 8] = (byte)((bitCount >> 0) & 0xff); /* Digest padding */ _HashData(pad, 0, pad.Length); /* Store digest */ Utils.DWORDToLittleEndian(hash, _stateMD160, 5); HashValue = hash; return(hash); }