/* * SEKS: Secrets Encrypted Kept Safe */ package main import ( "crypto/rand" "crypto/sha256" "fmt" "golang.org/x/crypto/nacl/secretbox" "seks/sopHex" ) func ran() []byte { var b [32]byte _, err := rand.Reader.Read(b[:]) if err != nil { panic(err) } return b[:] } func main() { // NaCl crypto_box symmetric encryption // Make a bbolt database // Add buckets for categories of secrets // User makes a password for each bucket passwd := []byte("TestPassword") encrypted, err := sopHex.UnMarshall(`-----BEGIN SEKS SECRET----- A+=PEEM3<3PI<++1VE+=VS1O+L+H1AN3 =L3HI+MPM33OE+3NANN1NASNSII=MV+N 1+P3VSOA+SOVLSL3VE=+EHM++LSPEAIM SLI3NPMPN3IMMP=V