Add check for size in generatePrime
Add size test in generateSafePrime
Require only that top bit is set, instead of top 2
This is the general standard, see e.g. OpenSSL
Add an error for too few bits being supplied to prime generator, and add documentation
Add some documentation and require highest two bits set
Simplify return syntax in generatePrime and generateSafePrime
Switch exponent to bit-shift for small performance boost