secret

package
v1.0.0-beta.18 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2019 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateAexSecretKey

func GenerateAexSecretKey() ([]byte, error)

func IsExtractDataError

func IsExtractDataError(err error) bool

Types

type AesSecret

type AesSecret struct {
	CipherBlock cipher.Block
}

func NewAesSecret

func NewAesSecret(key []byte) (*AesSecret, error)

func (*AesSecret) Decrypt

func (s *AesSecret) Decrypt(data []byte) ([]byte, error)

func (*AesSecret) Encrypt

func (s *AesSecret) Encrypt(data []byte) ([]byte, error)

type Secret

type Secret interface {
	Encrypt(data []byte) ([]byte, error)
	Decrypt(encodedData []byte) ([]byte, error)
}

func NewSecret

func NewSecret(key []byte) (Secret, error)

Jump to

Keyboard shortcuts

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