aes

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AES256

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

func (*AES256) Decrypt

func (a *AES256) Decrypt(cipherText string, key any) (string, error)

Decrypt decrypts the given ciphertext with the given key using AES-256-GCM

func (*AES256) Encrypt

func (a *AES256) Encrypt(plaintext string, key any) (string, error)

Encrypt encrypts the given plaintext with the given key using AES-256-GCM

type EncryptionKey

type EncryptionKey struct {
	Key []byte `json:"key"`
}

func GenerateKeys

func GenerateKeys() (*EncryptionKey, error)

Jump to

Keyboard shortcuts

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