simple

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decrypt

func Decrypt(password string, cipherstring string) (plain []byte, err error)

Decrypt decrypts a ciphertext from the cipherstring using the password. Uses AES-256-GCM (an authenticated encryption mode) to encrypt and decrypt data, password will be derived with PBKDF2 and 100.000 iterations. Because of this high iteration count the encryption and decryption process takes a minimum of around 200ms.

func Encrypt

func Encrypt(password string, plaintext []byte) (cipherstring string, err error)

Encrypt encrypts a plaintext using the password. Uses AES-256-GCM (an authenticated encryption mode) to encrypt and decrypt data, password will be derived with PBKDF2 and 100.000 iterations. Because of this high iteration count the encryption and decryption process takes a minimum of around 200ms.

Types

This section is empty.

Jump to

Keyboard shortcuts

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