func GetKeyWrapper(scheme string) keywrap.KeyWrapper {
	return keyWrappers[scheme]
}
GetKeyWrapper looks up the encryptor interface given an encryption scheme (gpg, jwe)
package ocicrypt
import (
	"encoding/base64"
	"encoding/json"
	"fmt"
	keyproviderconfig "github.com/containers/ocicrypt/config/keyprovider-config"
	"github.com/containers/ocicrypt/keywrap/keyprovider"
	"io"
	"strings"
	"github.com/containers/ocicrypt/blockcipher"
	"github.com/containers/ocicrypt/config"
	"github.com/containers/ocicrypt/keywrap"
	"github.com/containers/ocicrypt/keywrap/jwe"
	"github.com/containers/ocicrypt/keywrap/pgp"
	"github.com/containers/ocicrypt/keywrap/pkcs11"
	"github.com/containers/ocicrypt/keywrap/pkcs7"
	"github.com/opencontainers/go-digest"
	log "github.com/sirupsen/logrus"
	ocispec "github.com/opencontainers/image-spec/specs-go/v1"
	"github.com/pkg/errors"
)
type EncryptLayerFinalizer func() (map[string]string, error)
func init() {
	keyWrappers = make(map[string]keywrap.KeyWrapper)
	keyWrapperAnnotations = make(map[string]string)
	RegisterKeyWrapper("pgp", pgp.NewKeyWrapper())
	RegisterKeyWrapper("jwe", jwe.NewKeyWrapper())
	RegisterKeyWrapper("pkcs7", pkcs7.NewKeyWrapper())
	RegisterKeyWrapper("pkcs11", pkcs11.NewKeyWrapper())
	ic, err := keyproviderconfig.GetConfiguration()
	if err != nil {
		log.Error(err)
	} else if ic != nil {
		for provider, attrs := range ic.KeyProviderConfig {
			RegisterKeyWrapper("provider."+provider, keyprovider.NewKeyWrapper(provider, attrs))
		}
	}
}
var keyWrappers map[string]keywrap.KeyWrapper
var keyWrapperAnnotations map[string]string
func RegisterKeyWrapper(scheme string, iface keywrap.KeyWrapper) {
	keyWrappers[scheme] = iface
	keyWrapperAnnotations[iface.GetAnnotationID()] = scheme
}