ToUInt64BE() public static method

public static ToUInt64BE ( byte buffer, int offset ) : ulong
buffer byte
offset int
return ulong
Example #1
0
        public static UInt256 FromByteArrayBE(byte[] buffer, int offset = 0)
        {
            unchecked
            {
                if (buffer.Length < offset + 32)
                {
                    throw new ArgumentException();
                }

                var parts = new ulong[width];
                for (var i = 0; i < width; i++)
                {
                    parts[i] = Bits.ToUInt64BE(buffer, offset);
                    offset  += 8;
                }

                return(new UInt256(parts));
            }
        }