crypto

package
v0.3.7 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeString

func DecodeString(key []byte, val string) (string, error)

func Decrypt

func Decrypt(ciphertext []byte, key []byte) ([]byte, error)

Decrypt the given string with the given key. The key argument should be the AES key, either 16, 24, or 32 bytes to select AES-128, AES-192, or AES-256.

func EncodeString

func EncodeString(key []byte, val string) (string, error)

func Encrypt

func Encrypt(plaintext []byte, key []byte) ([]byte, error)

Encrypt the given string with the given key. The key argument should be the AES key, either 16, 24, or 32 bytes to select AES-128, AES-192, or AES-256.

func Hash

func Hash(str string) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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