1
0
Fork 0
mirror of https://github.com/Luzifer/go-dhparam.git synced 2024-11-09 15:50:02 +00:00

Add more explanation to the generator

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2018-10-08 01:16:44 +02:00
parent a43d8ee70f
commit f0b7e0bc19
Signed by: luzifer
GPG key ID: DC2729FDD34BE99E

View file

@ -27,6 +27,10 @@ type GeneratorCallback func(r GeneratorResult)
func nullCallback(r GeneratorResult) {}
// Generate determines a prime number according to the generator having the specified number of bits
//
// In OpenSSL defined generators are 2 and 5. Others are supported but the verification is not possible.
// The bit size should be adjusted to be high enough for the current requirements. Also you should keep
// in mind the higher the bitsize, the longer the generation might take.
func Generate(bits, generator int, cb GeneratorCallback) (*DH, error) {
var (
err error