crypt

package module
v0.0.0-...-dcb1a92 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EncryptedMessage

type EncryptedMessage struct {
	EncryptedKey []byte `json:"encrypted_key"`
	Message      []byte `json:"message"`
}

type PrivateKey

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

func (*PrivateKey) Decrypt

func (pk *PrivateKey) Decrypt(data []byte) ([]byte, error)

func (*PrivateKey) Init

func (pk *PrivateKey) Init(keyfile string) error

func (*PrivateKey) PublicKey

func (pk *PrivateKey) PublicKey() []byte

func (*PrivateKey) Sign

func (pk *PrivateKey) Sign(data []byte) ([]byte, error)

type PublicKey

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

func (*PublicKey) Encrypt

func (pk *PublicKey) Encrypt(data []byte) ([]byte, error)

func (*PublicKey) Init

func (pk *PublicKey) Init(key []byte) error

func (*PublicKey) Verify

func (pk *PublicKey) Verify(data []byte) bool

type SignedMessage

type SignedMessage struct {
	Signature []byte `json:"signature"`
	HashSum   []byte `json:"hash_sum"`
	Message   []byte `json:"message"`
}

Jump to

Keyboard shortcuts

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