func Encrypt(in io.Reader, out io.Writer) (int, error) {
	data, err := ioutil.ReadAll(in)
	if err != nil {
		return -1, err
	}
	var myKP crypto.Keypair
	if err = myKP.Generate(); err != nil {
		return -1, err
	}
	pubkey, err := json.ExtractPublicKey(data)
	if err != nil {
		return -1, err
	}
	encrypter := myKP.Encrypter(pubkey)
	walker := json.Walker{
		Action: encrypter.Encrypt,
	}
	newdata, err := walker.Walk(data)
	if err != nil {
		return -1, err
	}
	return out.Write(newdata)
}
Encrypt reads all contents from 'in', extracts the pubkey
and performs the requested encryption operation, writing
the resulting data to 'out'.
Returns the number of bytes written and any error that might have
occurred.
package ejson
import (
	"bytes"
	"encoding/hex"
	"fmt"
	"io"
	"io/ioutil"
	"os"
	"strings"
	"github.com/Shopify/ejson/crypto"
	"github.com/Shopify/ejson/json"
)
func GenerateKeypair() (pub string, priv string, err error) {
	var kp crypto.Keypair
	if err := kp.Generate(); err != nil {
		return "", "", err
	}
	return kp.PublicString(), kp.PrivateString(), nil
}