This module has basic math/crypto code.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
divceil(divident,
divisor)
Integer division with rounding up |
source code
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
isPrime(n,
iterations=5,
display=False,
sieve=[ 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 5... ) |
source code
|
|
|
|
|
|
|
|
|
numBits(n)
Return number of bits necessary to represent the integer in binary |
source code
|
|
|
numBytes(n)
Return number of bytes necessary to represent the integer in bytes |
source code
|
|
|
|
|
|
|
|
|
secureHMAC(k,
b,
algorithm)
Return a HMAC using `b` and `k` using `algorithm` |
source code
|
|
|
secureHash(data,
algorithm)
Return a digest of `data` using `algorithm` |
source code
|
|