sentry

package
v0.0.0-...-b9f6a0d Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package sentry wraps rsa.PublicKey

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Sentry

type Sentry struct {
	// contains filtered or unexported fields
}

Sentry ... TODO add SentryConfig

func Default

func Default() (*Sentry, error)

Default ...

func New

func New(size int) (*Sentry, error)

New ...

func (*Sentry) EncodedPublicKey

func (i *Sentry) EncodedPublicKey() ([]byte, error)

EncodedPublicKey ...

func (*Sentry) NewMessage

func (s *Sentry) NewMessage(payload interface{}) (*SignedMessage, error)

NewMessage ...

func (*Sentry) PublicKeyBase64

func (i *Sentry) PublicKeyBase64() (string, error)

PublicKeyBase64 ...

func (*Sentry) Sha256

func (i *Sentry) Sha256() ([]byte, error)

Sha256 ...

func (*Sentry) Sha256String

func (i *Sentry) Sha256String() (string, error)

Sha256String ...

type SignedMessage

type SignedMessage struct {
	Origin       rsa.PublicKey `json:"-" mapstructure:"origin"`
	PayloadBytes []byte        `json:"payload_bytes" mapstructure:"payload_bytes"`
	Signature    []byte        `json:"signature" mapstructure:"signature"`
}

SignedMessage ...

func (*SignedMessage) Payload

func (s *SignedMessage) Payload() (interface{}, error)

Payload ...

func (*SignedMessage) Verify

func (s *SignedMessage) Verify() error

Verify ...

Jump to

Keyboard shortcuts

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