func decodeEnvU(pemdata []byte) (envU, error) {
	privblock, pemdata := pem.Decode(pemdata)
	if privblock == nil {
		return envU{}, fmt.Errorf("Failed to decode private key")
	}
	if privblock.Type != "RSA PRIVATE KEY" {
		return envU{}, fmt.Errorf("Unexpected type of block: %s", privblock.Type)
	}
	privkey, err := x509.ParsePKCS1PrivateKey(privblock.Bytes)
	if err != nil {
		return envU{}, err
	}
	pubblock, _ := pem.Decode(pemdata)
	if pubblock == nil {
		return envU{}, fmt.Errorf("Failed to decode public key")
	}
	if pubblock.Type != "RSA PUBLIC KEY" {
		return envU{}, fmt.Errorf("Unexpected type of block: %s", pubblock.Type)
	}
	pubkey, err := x509.ParsePKCS1PublicKey(pubblock.Bytes)
	if err != nil {
		return envU{}, err
	}
	return envU{privU: privkey, pubS: pubkey}, nil
}
decodeEnvU decodes an envU from a slice of bytes.
package opaque
import (
	"crypto/rsa"
	"crypto/x509"
	"encoding/pem"
	"fmt"
)
type envU struct {
	privU *rsa.PrivateKey
	pubS  *rsa.PublicKey
}