Utility to encrypt and decrypt sensitive data for handshakejs. Code largely taken from here.
This library is part of the larger Handshake.js ecosystem.
package main
import (
"fmt"
"github.com/handshakejs/handshakejscrypter"
)
func main() {
handshakejscrypter.Setup("somesecretsaltthatis32characters") // 32 bytes
ciphertext := handshakejscrypter.Encrypt("some text to encrypt")
fmt.Println(ciphertext)
plaintext := handshakejscrypter.Decrypt(ciphertext)
fmt.Println(plaintext)
}