secret

package
v0.0.0-...-0e952b5 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Secret

type Secret struct {
	Key []byte // the master key a.k.a key encrypt key
}

func (*Secret) Decrypt

func (s *Secret) Decrypt(ciphertext []byte) ([]byte, error)

func (*Secret) Destroy

func (s *Secret) Destroy()

func (*Secret) Encrypt

func (s *Secret) Encrypt(plaintext []byte) ([]byte, error)

type SecretPayload

type SecretPayload struct {
	Salt       []byte `json:"s"`
	Nonce      []byte `json:"n"`
	Ciphertext []byte `json:"c"`
}

Jump to

Keyboard shortcuts

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