public static BigInteger ToBigInt(byte[] bytes) { if (bytes.Last() > 0x7f) { return(new BigInteger(ByteArrayHelpers.Concatenate(bytes, new byte[1]))); } return(new BigInteger(bytes)); }
public static byte[] ToBigEndianByteArray(uint[] raw) { return(ByteArrayHelpers.Concatenate(raw.Select(i => ToBigEndian(i)).ToArray())); }