crypt

package
v0.0.0-...-7a4e58b Latest Latest
Warning

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

Go to latest
Published: May 14, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

pkg/common/crypt/crypt.go

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecryptAES

func DecryptAES(data string, passphrase []byte) ([]byte, error)

DecryptAES decrypts data encrypted with AES-GCM using a passphrase

func EncryptAES

func EncryptAES(data []byte, passphrase []byte) (string, error)

EncryptAES encrypts data using AES-GCM with a passphrase

func SecureRandomInt

func SecureRandomInt(max int) (int, error)

func ValidPassphrase

func ValidPassphrase(passphrase []byte) error

Types

type PassphraseError

type PassphraseError struct {
	Issues []string
}

func (*PassphraseError) Error

func (e *PassphraseError) Error() string

Jump to

Keyboard shortcuts

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