trait BigInt extends AnyRef
All modQ
operations assume that Q is a global constant (an order of the only one cryptographically strong group
which is used for all cryptographic operations).
So it is globally and implicitly used in all methods.
- Alphabetic
- By Inheritance
- BigInt
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Abstract Value Members
- abstract def add(that: BigInt): BigInt
Returns a BigInt whose value is
(this + that)
.Returns a BigInt whose value is
(this + that)
.- that
value to be added to this BigInt.
- returns
{ @code this + that}
- abstract def and(that: BigInt): BigInt
Returns a BigInteger whose value is
(this & that)
.Returns a BigInteger whose value is
(this & that)
. (This method returns a negative BigInteger if and only ifthis
andthat
are both negative.)- that
value to be AND'ed with this BigInteger.
- returns
this & that
- abstract def compareTo(that: BigInt): Int
Compares this numeric with that numeric for order.
Compares this numeric with that numeric for order. Returns a negative integer, zero, or a positive integer as the
this
is less than, equal to, or greater thanthat
. - abstract def divide(that: BigInt): BigInt
Returns a BigInt whose value is
(this / that)
.Returns a BigInt whose value is
(this / that)
.- that
value by which this BigInt is to be divided.
- returns
{ @code this / that}
- Exceptions thrown
ArithmeticException
if { @code that} is zero.
- abstract def max(that: BigInt): BigInt
Returns the maximum of this BigInteger and
val
.Returns the maximum of this BigInteger and
val
.- that
value with which the maximum is to be computed.
- returns
the BigInteger whose value is the greater of this and { @code val}. If they are equal, either may be returned.
- abstract def min(that: BigInt): BigInt
Returns the minimum of this BigInteger and
val
.Returns the minimum of this BigInteger and
val
.- that
value with which the minimum is to be computed.
- returns
the BigInteger whose value is the lesser of this BigInteger and { @code val}. If they are equal, either may be returned.
- abstract def mod(m: BigInt): BigInt
Returns a BigInt whose value is
(this mod m
).Returns a BigInt whose value is
(this mod m
). This method differs fromremainder
in that it always returns a non-negative BigInteger.- m
the modulus.
- returns
{ @code this mod m}
- Exceptions thrown
ArithmeticException
{ @code m} ≤ 0- See also
#remainder
- abstract def multiply(that: BigInt): BigInt
Returns a BigInt whose value is
(this * that)
.Returns a BigInt whose value is
(this * that)
.- that
value to be multiplied by this BigInt.
- returns
{ @code this * that}
- abstract def negate(): BigInt
Returns a BigInt whose value is
(-this)
.Returns a BigInt whose value is
(-this)
.- returns
{ @code -this}
- abstract def or(that: BigInt): BigInt
Returns a BigInteger whose value is
(this | that)
.Returns a BigInteger whose value is
(this | that)
. (This method returns a negative BigInteger if and only if eitherthis
orthat
is negative.)
- that
value to be OR'ed with this BigInteger.
- returns
this | that
- abstract def remainder(that: BigInt): BigInt
Returns a BigInt whose value is
(this % that)
.Returns a BigInt whose value is
(this % that)
.- that
value by which this BigInt is to be divided, and the remainder computed.
- returns
{ @code this % that}
- Exceptions thrown
ArithmeticException
if { @code that} is zero.
- abstract def signum: Int
Returns the signum function of this BigInt.
Returns the signum function of this BigInt.
- returns
-1, 0 or 1 as the value of this BigInt is negative, zero or positive.
- abstract def subtract(that: BigInt): BigInt
Returns a BigInt whose value is
(this - that)
.Returns a BigInt whose value is
(this - that)
.- that
value to be subtracted from this BigInt.
- returns
{ @code this - that}
- abstract def toAbs: BigInt
Absolute value of this numeric value.
Absolute value of this numeric value.
- Since
2.0
- abstract def toByte: Byte
Convert this BigInt value to Byte.
Convert this BigInt value to Byte.
- Exceptions thrown
ArithmeticException
if overflow happens.
- abstract def toBytes: Coll[Byte]
Returns a big-endian representation of this BigInt in a collection of bytes.
Returns a big-endian representation of this BigInt in a collection of bytes. For example, the value
0x1213141516171819
would yield the byte array{0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19
}.- Since
2.0
- abstract def toInt: Int
Convert this BigInt value to Int.
Convert this BigInt value to Int.
- Exceptions thrown
ArithmeticException
if overflow happens.
- abstract def toLong: Long
Convert this BigInt value to Int.
Convert this BigInt value to Int.
- Exceptions thrown
ArithmeticException
if overflow happens.
- abstract def toShort: Short
Convert this BigInt value to Short.
Convert this BigInt value to Short.
- Exceptions thrown
ArithmeticException
if overflow happens.
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- def %(m: BigInt): BigInt
- def &(that: BigInt): BigInt
- def *(that: BigInt): BigInt
- def +(that: BigInt): BigInt
- def -(that: BigInt): BigInt
- def /(that: BigInt): BigInt
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- def |(that: BigInt): BigInt