func EncryptSHA256(data []byte, p Passphrase) (EncryptedData, error) {
	salt := make([]byte, saltSize)
	if _, err := rand.Read(salt); err != nil {
		return EncryptedData(""), err
	}
	key, err := CreateHashArgon(string(p), salt)
	if err != nil {
		return nil, err
	}
	block, err := aes.NewCipher([]byte(key))
	if err != nil {
		return nil, err
	}
	aesGCM, err := cipher.NewGCM(block)
	if err != nil {
		return nil, err
	}
	nonce := make([]byte, aesGCM.NonceSize())
	if _, err = io.ReadFull(rand.Reader, nonce); err != nil {
		return nil, err
	}
	cipherData := append([]byte(encryptionVer), salt...)
	cipherData = append(cipherData, aesGCM.Seal(nonce, nonce, data, nil)...)
	return cipherData, nil
}
encrypts byte slice using the passphrase
package v2
import (
	"crypto/aes"
	"crypto/cipher"
	"crypto/rand"
	"errors"
	"golang.org/x/crypto/argon2"
	"io"
	"strings"
)
type EncryptedData []byte
type DecryptedData []byte
type Hash string
const saltSize = 16
const encryptionVer string = "v0002" + "\n"
var supportedVersions = []string{"v0002"}
func CreateHashArgon(key string, salt []byte) (Hash, error) {
	return Hash(argon2.IDKey([]byte(key), salt, 1, 60*1024, 4, 32)), nil
}