MCPcopy Create free account
hub / github.com/containerd/imgcrypt / EncryptImage

Function EncryptImage

images/encryption/encryption.go:466–468  ·  view source on GitHub ↗

EncryptImage encrypts an image; it accepts either an OCI descriptor representing a manifest list or a single manifest

(ctx context.Context, cs content.Store, desc ocispec.Descriptor, cc *encconfig.CryptoConfig, lf LayerFilter)

Source from the content-addressed store, hash-verified

464
465// EncryptImage encrypts an image; it accepts either an OCI descriptor representing a manifest list or a single manifest
466func EncryptImage(ctx context.Context, cs content.Store, desc ocispec.Descriptor, cc *encconfig.CryptoConfig, lf LayerFilter) (ocispec.Descriptor, bool, error) {
467 return cryptImage(ctx, cs, desc, cc, lf, cryptoOpEncrypt)
468}
469
470// DecryptImage decrypts an image; it accepts either an OCI descriptor representing a manifest list or a single manifest
471func DecryptImage(ctx context.Context, cs content.Store, desc ocispec.Descriptor, cc *encconfig.CryptoConfig, lf LayerFilter) (ocispec.Descriptor, bool, error) {

Callers 1

GetImageEncryptConverterFunction · 0.85

Calls 1

cryptImageFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…