encryption

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package encryption provides encryption and decryption.

Index

Constants

View Source
const EncryptionKeyTypeAWSKMS = "aws_kms"
View Source
const EncryptionKeyTypeGoogleKMS = "google_kms"
View Source
const EncryptionKeyTypeLocal = "local"

Variables

This section is empty.

Functions

This section is empty.

Types

type AESCrypter

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

func NewAESCrypter

func NewAESCrypter(key []byte) *AESCrypter

func (*AESCrypter) Decrypt

func (s *AESCrypter) Decrypt(encrypted []byte) ([]byte, error)

func (*AESCrypter) Encrypt

func (s *AESCrypter) Encrypt(message []byte) ([]byte, error)

type Crypter

type Crypter interface {
	Encrypt(message []byte) (encrypted []byte, err error)
	Decrypt(encrypted []byte) (message []byte, err error)
}

Jump to

Keyboard shortcuts

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