Documentation ¶
Overview ¶
Example ¶
package main import ( "fmt" "github.com/stellaraf/go-utils/encryption" ) func main() { passphrase := "super secret password" data := "value to encrypt" encrypted, err := encryption.Encrypt(passphrase, data) if err != nil { panic(err) } decrypted, err := encryption.Decrypt(passphrase, encrypted) if err != nil { panic(err) } fmt.Println(decrypted) }
Output: value to encrypt
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Decrypt ¶
Decrypt decrypts a cipher that was encrypted using AES-256-GCM encryption.
Usage:
passphrase := "super secret password" cipherText := "cipher value" decrypted, err := encryption.Decrypt(passphrase, cipherText)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.