encrypt

package
v0.0.0-...-ea0be82 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecryptToByte

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

DecryptToByte decrypts the given ciphertext using AES-GCM.

func DecryptToByteChaCha20Poly1305

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

DecryptToByteChaCha20Poly1305 decrypts the given ciphertext using ChaCha20-Poly1305.

func DecryptToString

func DecryptToString(ciphertext, key string) (string, error)

DecryptToString decrypts the given base64-encoded ciphertext using AES-GCM.

func DecryptToStringChaCha20Poly1305

func DecryptToStringChaCha20Poly1305(ciphertext, key string) (string, error)

DecryptToStringChaCha20Poly1305 decrypts the given base64-encoded ciphertext using ChaCha20-Poly1305.

func EncryptToByte

func EncryptToByte(value, key []byte) ([]byte, error)

EncryptToByte encrypts the given value using AES-GCM.

func EncryptToByteChaCha20Poly1305

func EncryptToByteChaCha20Poly1305(value, key []byte) ([]byte, error)

EncryptToByteChaCha20Poly1305 encrypts the given value using ChaCha20-Poly1305.

func EncryptToString

func EncryptToString(value, key string) (string, error)

EncryptToString encrypts the given value using AES-GCM and encodes the result in base64.

func EncryptToStringChaCha20Poly1305

func EncryptToStringChaCha20Poly1305(value, key string) (string, error)

EncryptToStringChaCha20Poly1305 encrypts the given value using ChaCha20-Poly1305 and encodes the result in base64.

Types

This section is empty.

Jump to

Keyboard shortcuts

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