crypto

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeBase64

func DecodeBase64(encoded string) ([]byte, error)

DecodeBase64 decodes data from base64

func Decrypt

func Decrypt(encryptedData, password string) ([]byte, error)

Decrypt decrypts data using AES-256-CBC with PBKDF2

func EncodeBase64

func EncodeBase64(data []byte) string

EncodeBase64 encodes data to base64

func Encrypt

func Encrypt(data []byte, password string) (string, error)

Encrypt encrypts data using AES-256-CBC with PBKDF2

func GenerateRandomBytes

func GenerateRandomBytes(length int) ([]byte, error)

GenerateRandomBytes generates random bytes of the specified length

func HashSHA256

func HashSHA256(data []byte) string

HashSHA256 returns the SHA256 hash of data

Types

This section is empty.

Jump to

Keyboard shortcuts

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