package encryption
import "github.com/containerd/containerd/images/encryption"
Index ¶
- func CheckAuthorization(ctx context.Context, cs content.Store, desc ocispec.Descriptor, dc *encconfig.DecryptConfig) error
- func DecryptImage(ctx context.Context, cs content.Store, desc ocispec.Descriptor, cc *encconfig.CryptoConfig, lf LayerFilter) (ocispec.Descriptor, bool, error)
- func EncryptImage(ctx context.Context, cs content.Store, desc ocispec.Descriptor, cc *encconfig.CryptoConfig, lf LayerFilter) (ocispec.Descriptor, bool, error)
- func HasEncryptedLayer(ctx context.Context, layerInfos []ocispec.Descriptor) bool
- func IsEncryptedDiff(ctx context.Context, mediaType string) bool
- type LayerFilter
Functions ¶
func CheckAuthorization ¶
func CheckAuthorization(ctx context.Context, cs content.Store, desc ocispec.Descriptor, dc *encconfig.DecryptConfig) error
CheckAuthorization checks whether a user has the right keys to be allowed to access an image (every layer) It takes decrypting of the layers only as far as decrypting the asymmetrically encrypted data The decryption is only done for the current platform
func DecryptImage ¶
func DecryptImage(ctx context.Context, cs content.Store, desc ocispec.Descriptor, cc *encconfig.CryptoConfig, lf LayerFilter) (ocispec.Descriptor, bool, error)
DecryptImage decrypts an image; it accepts either an OCI descriptor representing a manifest list or a single manifest
func EncryptImage ¶
func EncryptImage(ctx context.Context, cs content.Store, desc ocispec.Descriptor, cc *encconfig.CryptoConfig, lf LayerFilter) (ocispec.Descriptor, bool, error)
EncryptImage encrypts an image; it accepts either an OCI descriptor representing a manifest list or a single manifest
func HasEncryptedLayer ¶
func HasEncryptedLayer(ctx context.Context, layerInfos []ocispec.Descriptor) bool
HasEncryptedLayer returns true if any LayerInfo indicates that the layer is encrypted
func IsEncryptedDiff ¶
IsEncryptedDiff returns true if mediaType is a known encrypted media type.
Types ¶
type LayerFilter ¶
type LayerFilter func(desc ocispec.Descriptor) bool
LayerFilter allows to select Layers by certain criteria
Source Files ¶
- Version
- v1.3.0-beta.0
- Published
- Jul 31, 2019
- Platform
- js/wasm
- Imports
- 16 packages
- Last checked
- 5 minutes ago –
Tools for package owners.