예제 #1
0
        public DerInteger(
            BigInteger value)
        {
            if (value == null)
                throw new ArgumentNullException("value");

            bytes = value.ToByteArray();
        }
예제 #2
0
        private static BigInteger createUValueOf(
            ulong value)
        {
            int msw = (int)(value >> 32);
            int lsw = (int)value;

            if (msw != 0)
                return new BigInteger(1, new int[] { msw, lsw }, false);

            if (lsw != 0)
            {
                BigInteger n = new BigInteger(1, new int[] { lsw }, false);
                return n;
            }

            return Zero;
        }
예제 #3
0
 public int CompareTo(
     BigInteger value)
 {
     return sign < value.sign ? -1
         : sign > value.sign ? 1
         : sign == 0 ? 0
         : sign * CompareNoLeadingZeroes(0, magnitude, 0, value.magnitude);
 }