encrypter

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GCM          = "GCM"
	CBC          = "CBC"
	MinNonceSize = 12
	EncryptKey   = "Moov Irs Encryption AES-256 Key "
)

Variables

This section is empty.

Functions

func CreateKey

func CreateKey(key string) []byte

func GenerateNonce

func GenerateNonce(id string, created time.Time) []byte

Types

type EncryptService

type EncryptService interface {
	Encrypt(buf, non []byte) ([]byte, error)
	Decrypt(buf, non []byte) ([]byte, error)
	GetType() string
}

func NewEncryptService

func NewEncryptService(key, method string) (EncryptService, error)

Jump to

Keyboard shortcuts

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