public static ToUInt64BE ( byte buffer, int offset ) : ulong | ||
buffer | byte | |
offset | int | |
Résultat | ulong |
public static ulong ToUInt64BE(byte[] buffer, int offset = 0)
{
return unchecked((ulong)ToInt64BE(buffer, offset));
}
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)); } }