Help us shape the future of Go! Take the 2026 Go Developer Survey

crypto

package
v1.17.17 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Registry

type Registry struct {
	Logger logger.Logger
	// contains filtered or unexported fields
}

Registry is used to get registered crypto provider implementations.

var DefaultRegistry *Registry = NewRegistry()

DefaultRegistry is the singleton with the registry.

func NewRegistry

func NewRegistry() *Registry

NewRegistry returns a new crypto provider registry.

func (*Registry) Create

func (s *Registry) Create(name, version, logName string) (crypto.SubtleCrypto, error)

Create instantiates a crypto provider based on `name`.

func (*Registry) RegisterComponent

func (s *Registry) RegisterComponent(componentFactory func(logger.Logger) crypto.SubtleCrypto, names ...string)

RegisterComponent adds a new crypto provider to the registry.

Jump to

Keyboard shortcuts

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