Skip to content

Latest commit

 

History

History
30 lines (20 loc) · 974 Bytes

README.md

File metadata and controls

30 lines (20 loc) · 974 Bytes

handshakejscrypter

handshakejscrypter

BuildStatus

Utility to encrypt and decrypt sensitive data for handshakejs. Code largely taken from here.

This library is part of the larger Handshake.js ecosystem.

Usage

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)
}