crypto

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InvalidVersion

func InvalidVersion() error

func Rand16

func Rand16() (bytes [16]byte, err error)

func Rand24

func Rand24() (bytes [24]byte, err error)

func Rand32

func Rand32() (bytes [32]byte, err error)

Types

type Cipher

type Cipher interface {
	Version() string
	Encrypt([]byte) ([]byte, error)
	Decrypt(string, []byte) ([]byte, error)
}

func AES128GCM

func AES128GCM(version string, key [16]byte) (Cipher, error)

func AES192GCM

func AES192GCM(version string, key [24]byte) (Cipher, error)

func AES256GCM

func AES256GCM(version string, key [32]byte) (Cipher, error)

func Ciphers

func Ciphers(main Cipher, many ...Cipher) Cipher

Jump to

Keyboard shortcuts

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