Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateKey ¶
func GenerateKey(bits int) (privatekey *rsa.PrivateKey)
GenerateKey creates a rsa.PrivateKey of bits length or returns nil on error.
Types ¶
type GoKeyServer ¶
type GoKeyServer struct {
// contains filtered or unexported fields
}
GoKeyServer is the server struct
func New ¶
func New(rotationInterval time.Duration, generatorCount int) (s *GoKeyServer, err error)
New is used to initialize the channel generator and key rotation seconds determines how often in memory keys are rotated or zero for no rotation.
func (*GoKeyServer) GetGeneratedKey ¶
func (s *GoKeyServer) GetGeneratedKey() *rsa.PrivateKey
GetGeneratedKey retrieves a pre generated key from the channel.
Click to show internal directories.
Click to hide internal directories.