encryption

package
v0.9.5 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decrypt

func Decrypt(data, password string) (string, error)

Decrypt takes a base64-encoded, versioned encrypted string and password, then returns the decrypted plaintext or an error.

func Encrypt

func Encrypt(data, password string) (string, error)

Encrypt takes plaintext and a password, and returns a base64-encoded string with a versioned prefix. It uses scrypt for key derivation and AES-GCM for authenticated encryption.

func IsEncrypted

func IsEncrypted(data string) bool

IsEncrypted checks whether the given string has the expected encrypted prefix.

Types

This section is empty.

Jump to

Keyboard shortcuts

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