server

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 24, 2018 License: Apache-2.0 Imports: 4 Imported by: 2

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL