Documentation ¶
Index ¶
- func MustNormalizePublicKey(b []byte) string
- func MustPublicKeyToBytes(key crypto.PublicKey) []byte
- func MustPublicKeyToString(key crypto.PublicKey) string
- func NewCryptographyService() cryptography.Service
- func NewKeyBoundCryptographyService(privateKey crypto.PrivateKey) cryptography.Service
- func NewKeyProcessor() cryptography.KeyProcessor
- func NewPlatformCryptographyScheme() cryptography.PlatformCryptographyScheme
- func NewStorageBoundCryptographyService(path string) (cryptography.Service, error)
- type NodeCryptographyService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MustNormalizePublicKey ¶
MustNormalizePublicKey parses public key in PEM format, returns normalized (stable) public key value. Panics on error.
func MustPublicKeyToBytes ¶
MustPublicKeyToBytes returns byte representation of public key. Panics on error.
func MustPublicKeyToString ¶
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
Click to show internal directories.
Click to hide internal directories.