platformpolicy

package
v0.0.0-...-05bc493 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MustNormalizePublicKey

func MustNormalizePublicKey(b []byte) string

MustNormalizePublicKey parses public key in PEM format, returns normalized (stable) public key value. Panics on error.

func MustPublicKeyToBytes

func MustPublicKeyToBytes(key crypto.PublicKey) []byte

MustPublicKeyToBytes returns byte representation of public key. Panics on error.

func MustPublicKeyToString

func MustPublicKeyToString(key crypto.PublicKey) string

MustPublicKeyToString returns string representation of public key. Panics on error.

func NewCryptographyService

func NewCryptographyService() cryptography.Service

func NewKeyBoundCryptographyService

func NewKeyBoundCryptographyService(privateKey crypto.PrivateKey) cryptography.Service

func NewKeyProcessor

func NewKeyProcessor() cryptography.KeyProcessor

func NewPlatformCryptographyScheme

func NewPlatformCryptographyScheme() cryptography.PlatformCryptographyScheme

func NewStorageBoundCryptographyService

func NewStorageBoundCryptographyService(path string) (cryptography.Service, error)

Types

type NodeCryptographyService

type NodeCryptographyService struct {
	KeyStore                   cryptography.KeyStore                   `inject:""`
	PlatformCryptographyScheme cryptography.PlatformCryptographyScheme `inject:""`
	KeyProcessor               cryptography.KeyProcessor               `inject:""`
}

func (*NodeCryptographyService) GetPublicKey

func (cs *NodeCryptographyService) GetPublicKey() (crypto.PublicKey, error)

func (*NodeCryptographyService) Sign

func (cs *NodeCryptographyService) Sign(payload []byte) (*cryptography.Signature, error)

func (*NodeCryptographyService) Verify

func (cs *NodeCryptographyService) Verify(publicKey crypto.PublicKey, signature cryptography.Signature, payload []byte) bool

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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