- abs
BigInt abs()
- binaryDecode
void binaryDecode(const(ubyte)* buf, size_t length)
Read integer value from a ubyte array with given size
- binaryDecode
void binaryDecode(Vector!(ubyte, ALLOC) buf)
Read integer value from a ubyte array (SecureVector!ubyte)
- binaryDecode
void binaryDecode(const(Vector!(ubyte, ALLOC))* buf)
Undocumented in source. Be warned that the author may not have intended to support it.
- binaryDecode
void binaryDecode(RefCounted!(Vector!(ubyte, ALLOC), ALLOC) buf)
Read integer value from a ubyte array (SecureVector!ubyte)
- binaryDecode
void binaryDecode(const(RefCounted!(Vector!(ubyte, ALLOC), ALLOC))* buf)
Undocumented in source. Be warned that the author may not have intended to support it.
- binaryEncode
void binaryEncode(ubyte* output)
Store BigInt-value in a given ubyte array
- bits
size_t bits()
Get the bit length of the integer
- byteAt
ubyte byteAt(size_t n)
- bytes
size_t bytes()
Give ubyte length of the integer
- clear
void clear()
Zeroize the BigInt. The size of the underlying register is not
modified.
- clearBit
void clearBit(size_t n)
Clear bit at specified position
- cmp
int cmp(const(BigInt)* other, bool check_signs)
Compare this to another BigInt
- cmp
int cmp(BigInt other, bool check_signs)
Undocumented in source. Be warned that the author may not have intended to support it.
- encodedSize
size_t encodedSize(Base base)
- flipSign
void flipSign()
Flip the sign of this BigInt
- getBit
bool getBit(size_t n)
Return bit value at specified position
- getSubstring
uint getSubstring(size_t offset, size_t length)
Return (a maximum of) 32 bits of the complete value
- growTo
void growTo(size_t n)
Increase internal register buffer to at least n words
- isEven
bool isEven()
Test if the integer has an even value
- isNegative
bool isNegative()
Tests if the sign of the integer is negative
- isNonzero
bool isNonzero()
Test if the integer is not zero
- isOdd
bool isOdd()
Test if the integer has an odd value
- isPositive
bool isPositive()
Tests if the sign of the integer is positive
- isZero
bool isZero()
Test if the integer is zero
- length
size_t length()
Undocumented in source. Be warned that the author may not have intended to support it.
- load
void load(BigInt* other)
- maskBits
void maskBits(size_t n)
Clear all but the lowest n bits
- mutablePtr
word* mutablePtr()
Return a mutable pointer to the register
- opAssign
void opAssign(T number)
Undocumented in source. Be warned that the author may not have intended to support it.
- opAssign
BigInt opAssign(size_t other)
- opAssign
void opAssign(T other)
- opAssign
void opAssign(T other)
Undocumented in source. Be warned that the author may not have intended to support it.
- opAssign
void opAssign(BigInt other)
- opAssign
void opAssign(BigInt other)
- opBinary
BigInt opBinary(const(BigInt)* y)
Undocumented in source. Be warned that the author may not have intended to support it.
- opBinary
BigInt opBinary(const(BigInt) y)
Undocumented in source. Be warned that the author may not have intended to support it.
- opBinary
BigInt opBinary(word y)
Undocumented in source. Be warned that the author may not have intended to support it.
- opBinary
BigInt opBinary(const(BigInt)* y)
Undocumented in source. Be warned that the author may not have intended to support it.
- opBinary
BigInt opBinary(BigInt y)
Undocumented in source. Be warned that the author may not have intended to support it.
- opBinary
BigInt opBinary(word y)
Undocumented in source. Be warned that the author may not have intended to support it.
- opBinary
BigInt opBinary(const(BigInt)* y)
Undocumented in source. Be warned that the author may not have intended to support it.
- opBinary
BigInt opBinary(BigInt y)
Undocumented in source. Be warned that the author may not have intended to support it.
- opBinary
BigInt opBinary(word y)
Undocumented in source. Be warned that the author may not have intended to support it.
- opBinary
BigInt opBinary(const(BigInt)* y)
Undocumented in source. Be warned that the author may not have intended to support it.
- opBinary
BigInt opBinary(BigInt y)
Undocumented in source. Be warned that the author may not have intended to support it.
- opBinary
BigInt opBinary(word y)
Undocumented in source. Be warned that the author may not have intended to support it.
- opBinary
BigInt opBinary(const(BigInt)* mod)
Undocumented in source. Be warned that the author may not have intended to support it.
- opBinary
BigInt opBinary(BigInt mod)
Undocumented in source. Be warned that the author may not have intended to support it.
- opBinary
word opBinary(word mod)
Undocumented in source. Be warned that the author may not have intended to support it.
- opBinary
BigInt opBinary(size_t shift)
Undocumented in source. Be warned that the author may not have intended to support it.
- opBinary
BigInt opBinary(size_t shift)
Undocumented in source. Be warned that the author may not have intended to support it.
- opCast
T opCast()
- opCmp
int opCmp(const(BigInt)* b)
Undocumented in source. Be warned that the author may not have intended to support it.
- opCmp
int opCmp(BigInt b)
Undocumented in source. Be warned that the author may not have intended to support it.
- opCmp
int opCmp(size_t n)
Undocumented in source. Be warned that the author may not have intended to support it.
- opEquals
bool opEquals(const(BigInt)* b)
Undocumented in source. Be warned that the author may not have intended to support it.
- opEquals
bool opEquals(BigInt b)
Undocumented in source. Be warned that the author may not have intended to support it.
- opEquals
bool opEquals(size_t n)
Undocumented in source. Be warned that the author may not have intended to support it.
- opOpAssign
void opOpAssign(const(BigInt)* y)
- opOpAssign
void opOpAssign(BigInt y)
Undocumented in source. Be warned that the author may not have intended to support it.
- opOpAssign
void opOpAssign(word y)
Undocumented in source. Be warned that the author may not have intended to support it.
- opOpAssign
void opOpAssign(const(BigInt)* y)
- opOpAssign
void opOpAssign(BigInt y)
Undocumented in source. Be warned that the author may not have intended to support it.
- opOpAssign
void opOpAssign(word y)
Undocumented in source. Be warned that the author may not have intended to support it.
- opOpAssign
void opOpAssign(const(BigInt)* y)
- opOpAssign
void opOpAssign(BigInt y)
Undocumented in source. Be warned that the author may not have intended to support it.
- opOpAssign
void opOpAssign(word y)
Undocumented in source. Be warned that the author may not have intended to support it.
- opOpAssign
void opOpAssign(const(BigInt)* y)
- opOpAssign
void opOpAssign(BigInt y)
Undocumented in source. Be warned that the author may not have intended to support it.
- opOpAssign
void opOpAssign(word y)
Undocumented in source. Be warned that the author may not have intended to support it.
- opOpAssign
void opOpAssign(const(BigInt)* mod)
- opOpAssign
void opOpAssign(BigInt mod)
Undocumented in source. Be warned that the author may not have intended to support it.
- opOpAssign
void opOpAssign(word mod)
- opOpAssign
void opOpAssign(size_t shift)
- opOpAssign
void opOpAssign(size_t shift)
- opUnary
BigInt opUnary()
- opUnary
BigInt opUnary()
- opUnary
BigInt opUnary()
- randomize
void randomize(RandomNumberGenerator rng, size_t bitsize, bool set_high_bit)
Fill BigInt with a random number with size of bitsize
If set_high_bit is true, the highest bit will be set, which causes
the entropy to be bits-1. Otherwise the highest bit is randomly choosen
by the rng, causing the entropy to be bits.
- reserve
void reserve(size_t n)
Undocumented in source. Be warned that the author may not have intended to support it.
- reverseSign
Sign reverseSign()
- setBit
void setBit(size_t n)
Set bit at specified position
- setSign
void setSign(Sign s)
- sigWords
size_t sigWords()
Return how many words we need to hold this value
- sign
Sign sign()
Return the sign of the integer
- size
size_t size()
Give size of internal register
- swap
void swap(T other_)
Swap this value with another
- swap
void swap(BigInt* other_)
Undocumented in source. Be warned that the author may not have intended to support it.
- swap
void swap(BigInt other_)
Undocumented in source. Be warned that the author may not have intended to support it.
- swap
void swap(BigInt other_)
Undocumented in source. Be warned that the author may not have intended to support it.
- swapReg
void swapReg(SecureVector!word reg)
Undocumented in source. Be warned that the author may not have intended to support it.
- toString
string toString(Base base)
Undocumented in source. Be warned that the author may not have intended to support it.
- toUint
uint toUint()
Convert this value into a uint, if it is in the range
[0 ... 2**32-1], or otherwise throw new an exception.
- toVector
Vector!char toVector(Base base)
Undocumented in source. Be warned that the author may not have intended to support it.
- wordAt
word wordAt(size_t n)
Return the word at a specified position of the internal register
- decode
BigInt decode(const(ubyte)* buf, size_t length, Base base)
Create a BigInt from an integer in a ubyte array
- decode
BigInt decode(RefCounted!(Vector!(ubyte, ALLOC), ALLOC) buf, Base base)
Create a BigInt from an integer in a ubyte array
- decode
BigInt decode(Vector!(ubyte, ALLOC) buf, Base base)
Create a BigInt from an integer in a ubyte array
- decode
BigInt decode(const(Vector!(ubyte, ALLOC)*) buf, Base base)
Undocumented in source. Be warned that the author may not have intended to support it.
- encode
Vector!ubyte encode(const(BigInt)* n, Base base)
Encode the integer value from a BigInt to an Array of bytes
- encode
Vector!ubyte encode(BigInt n, Base base)
Undocumented in source. Be warned that the author may not have intended to support it.
- encode
void encode(ubyte* output, const(BigInt)* n, Base base)
Encode the integer value from a BigInt to a ubyte array
- encode
void encode(ubyte* output, BigInt n, Base base)
Undocumented in source. Be warned that the author may not have intended to support it.
- encode1363
SecureVector!ubyte encode1363(const(BigInt)* n, size_t bytes)
Encode a BigInt to a ubyte array according to IEEE 1363
- encode1363
SecureVector!ubyte encode1363(BigInt n, size_t bytes)
Undocumented in source. Be warned that the author may not have intended to support it.
- encodeLocked
SecureVector!ubyte encodeLocked(const(BigInt)* n, Base base)
Encode the integer value from a BigInt to a Secure Array of bytes
- encodeLocked
SecureVector!ubyte encodeLocked(BigInt n, Base base)
Undocumented in source. Be warned that the author may not have intended to support it.
- powerOf2
BigInt powerOf2(size_t n)
- randomInteger
BigInt randomInteger(RandomNumberGenerator rng, const(BigInt)* min, const(BigInt)* max)
- randomInteger
BigInt randomInteger(RandomNumberGenerator rng, BigInt min, BigInt max)
Undocumented in source. Be warned that the author may not have intended to support it.
Arbitrary precision integer