Esempio n. 1
0
        public static Byte[] GetValueAsBytes(Int64 value)
        {
            String valueAsString = value.ToString("0");

            Org.BouncyCastle.Math.BigInteger v = new Org.BouncyCastle.Math.BigInteger(valueAsString);

            Byte[] x = new Byte[8];
            Byte[] y = v.ToByteArray();
            Array.Reverse(y);
            Array.Copy(y, x, y.Length);

            string forDebug = v.ToHexNumberString();

            return(x);
        }