key

package
v2.5.0 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type KeyPair

type KeyPair struct {
	PublicKey  string
	PrivateKey string
}

func NewEcdsaKeysFromProto

func NewEcdsaKeysFromProto(k *proto.GenerateLocalKeyResponse) KeyPair

func NewRsaKeyPairFromProto

func NewRsaKeyPairFromProto(k *proto.GenerateLocalKeyResponse) KeyPair

type KeyProtectionLevel

type KeyProtectionLevel int32
const (
	KEY_PROTECTION_SOFTWARE KeyProtectionLevel = iota
	KEY_PROTECTION_HSM      KeyProtectionLevel = iota
)

type KeyType

type KeyType int32
const (
	EcP256k KeyType = iota
	Rsa2048 KeyType = iota
	Rsa3072 KeyType = iota
	Rsa4096 KeyType = iota
	Aes128  KeyType = iota
	Aes256  KeyType = iota
)

type LocalKey

type LocalKey struct {
	Key        string
	PrivateKey string
}

func NewLocalKeyFromProto

func NewLocalKeyFromProto(s *proto.LocalKey) LocalKey

func (LocalKey) ToProto

func (s LocalKey) ToProto() *proto.LocalKey

type ManagedKey

type ManagedKey struct {
	ID         string
	Name       string
	Protection KeyProtectionLevel
	KeyType    KeyType
	Expiration int64
	Key        string
}

func NewManagedKeyFromProto

func NewManagedKeyFromProto(s *proto.ManagedKey) ManagedKey

func (ManagedKey) ToProto

func (s ManagedKey) ToProto() *proto.ManagedKey

type ManagedKeyParams

type ManagedKeyParams struct {
	Name       string
	Protection KeyProtectionLevel
	KeyType    KeyType
	Expiration int64
}

func NewManagedKeyParamsFromProto

func NewManagedKeyParamsFromProto(s *proto.ManagedKeyParams) ManagedKeyParams

func (ManagedKeyParams) ToProto

Jump to

Keyboard shortcuts

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