From f0b7e0bc19789b914d9446008cb53991ed20cb2e Mon Sep 17 00:00:00 2001 From: Knut Ahlers Date: Mon, 8 Oct 2018 01:16:44 +0200 Subject: [PATCH] Add more explanation to the generator Signed-off-by: Knut Ahlers --- generator.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/generator.go b/generator.go index e526e24..e96c14d 100644 --- a/generator.go +++ b/generator.go @@ -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