private static EInteger UInt64ToEInteger(ulong value)
{
var data = new byte[9];
ulong uvalue = value;
data[0] = (byte)(uvalue & 0xff);
data[1] = (byte)((uvalue >> 8) & 0xff);
data[2] = (byte)((uvalue >> 16) & 0xff);
data[3] = (byte)((uvalue >> 24) & 0xff);
data[4] = (byte)((uvalue >> 32) & 0xff);
data[5] = (byte)((uvalue >> 40) & 0xff);
data[6] = (byte)((uvalue >> 48) & 0xff);
data[7] = (byte)((uvalue >> 56) & 0xff);
data[8] = (byte)0;
return EInteger.FromBytes(data, true);
}