func Scrypt(pass, salt []byte) (key [32]byte, err error) {
	keyBytes, err := scrypt.Key(pass, salt, 262144, 8, 1, 32)
	copy(key[:], keyBytes)
	return
}
Scrypt is a wrapper around scrypt.Key that performs the Scrypt
algorithm on the input with opinionated defaults.
package pc
import (
	"crypto/rand"
	"encoding/hex"
	"encoding/json"
	"errors"
	"fmt"
	"io/ioutil"
	"log"
	"github.com/scmn-dev/secman-v1/pkg/pio"
	"golang.org/x/crypto/curve25519"
	"golang.org/x/crypto/nacl/box"
	"golang.org/x/crypto/nacl/secretbox"
	"golang.org/x/crypto/scrypt"
)
const (
	MaxPwLength = 2048
)
var (
	DigitLowerBound = 48
	DigitUpperBound = 57
	UpperCaseLowerBound = 65
	UpperCaseUpperBound = 90
	LowerCaseLowerBound = 97
	LowerCaseUpperBound = 122
	SymbolGrp1LowerBound = 33
	SymbolGrp1UpperBound = 47
	SymbolGrp2LowerBound = 58
	SymbolGrp2UpperBound = 64
	SymbolGrp3LowerBound = 91
	SymbolGrp3UpperBound = 96
	SymbolGrp4LowerBound = 123
	SymbolGrp4UpperBound = 126
)
type PasswordSpecs struct {
	NeedsUpper  bool
	NeedsLower  bool
	NeedsSymbol bool
	NeedsDigit  bool
}
func Seal(key *[32]byte, message []byte) ([]byte, error) {
	var nonce [24]byte
	if _, err := rand.Read(nonce[:]); err != nil {
		return nil, err
	}
	return secretbox.Seal(nonce[:], message, &nonce, key), nil
}
func SealAsym(message []byte, pub *[32]byte, priv *[32]byte) (out []byte, err error) {
	var nonce [24]byte
	if _, err := rand.Read(nonce[:]); err != nil {
		return nil, err
	}
	sealedBytes := box.Seal(out, message, &nonce, pub, priv)
	return append(nonce[:], sealedBytes...), nil
}
func OpenAsym(ciphertext []byte, pub, priv *[32]byte) (out []byte, err error) {
	var nonce [24]byte
	copy(nonce[:], ciphertext[:24])
	out, ok := box.Open(out[:0], ciphertext[24:], &nonce, pub, priv)
	if !ok {
		err = errors.New("Unable to decrypt message")
	}
	return
}
func Open(key *[32]byte, ciphertext []byte) (message []byte, err error) {
	var nonce [24]byte
	copy(nonce[:], ciphertext[:24])
	message, ok := secretbox.Open(message[:0], ciphertext[24:], &nonce, key)
	if !ok {
		err = errors.New("Unable to decrypt message")
	}
	return
}