Versions in this module Expand all Collapse all v0 v0.1.6 Oct 27, 2026 Changes in this version + const CertificateScheme + const EntryPoint + const Namespace + const PasswordScheme + var ErrAlreadyEncrypted = errors.New("crypt: input is already encrypted") + var ErrCredentialsRequired = errors.New("crypt: credentials required") + var ErrDecryptFailed = errors.New("crypt: credentials do not match or ciphertext is damaged") + var ErrInvalidMetadata = errors.New("crypt: invalid encryption metadata") + var ErrLimitExceeded = errors.New("crypt: resource limit exceeded") + var ErrLocked = errors.New("crypt: encrypted OFD is locked") + var ErrNotEncrypted = errors.New("crypt: no encryption entry point") + var ErrProtectedContent = errors.New("crypt: transformation would change protected content") + var ErrUnsupported = errors.New("crypt: unsupported encryption feature") + func Present(pkg *container.Package) bool + type CredentialRequest struct + DecryptSeedLoc string + OperationID string + Recipients []Recipient + Scheme string + type CredentialResolver func(context.Context, CredentialRequest) (Credentials, error) + type Credentials struct + MissingScheme string + Password []byte + PrivateKey crypto.Decrypter + UserName string + type DecryptOptions struct + Limits Limits + MissingScheme string + Mode Mode + Password []byte + PrivateKey crypto.Decrypter + Resolve CredentialResolver + UserName string + func NormalizeDecryptOptions(opt DecryptOptions) (DecryptOptions, error) + type DecryptReport struct + DecryptedEntries int + Diagnostics []Diagnostic + OperationID string + Operations []OperationResult + OutputBytes int64 + OutputEntries int + Recipient Recipient + Scheme string + State string + func DecryptPackage(ctx context.Context, pkg *container.Package, opt DecryptOptions, ...) (*DecryptReport, error) + type Diagnostic struct + Code string + File string + Message string + type EncryptOptions struct + Append *DecryptOptions + Entries []string + IndependentKeys bool + KeepRoot bool + Limits Limits + Pages *PageSelection + PlaintextMap bool + Recipients []EncryptRecipient + func NormalizeEncryptOptions(opt EncryptOptions) (EncryptOptions, error) + type EncryptRecipient struct + Certificate []byte + Password []byte + UserName string + UserType string + type EncryptReport struct + EncryptedEntries int + IndependentKeys bool + OperationID string + OutputBytes int64 + OutputEntries int + Recipients []Recipient + Relative string + Scheme string + SelectedEntries []string + SharedResources bool + State string + func EncryptPackage(ctx context.Context, pkg *container.Package, opt EncryptOptions, ...) (*EncryptReport, error) + type Info struct + Diagnostics []Diagnostic + Encrypted bool + EntryPoint string + Opaque bool + Operations []Operation + State string + func InspectPackage(ctx context.Context, pkg *container.Package, opt InspectOptions) (*Info, error) + type InspectOptions struct + Limits Limits + Mode Mode + func NormalizeOptions(opt InspectOptions) (InspectOptions, error) + type Limits struct + MaxCredentialAttempts int + MaxEntries int + MaxEntryBytes int64 + MaxInputBytes int64 + MaxLayers int + MaxMappings int + MaxMetadataBytes int64 + MaxOperations int + MaxProcessedBytes int64 + MaxRecipients int + MaxTotalBytes int64 + MaxTotalMetadataBytes int64 + MaxXMLDepth int + MaxXMLNodes int + type LockedError struct + Cause error + Info *Info + func (e *LockedError) Error() string + func (e *LockedError) Is(target error) bool + func (e *LockedError) Unwrap() error + type Mapping struct + DecryptSeedLoc string + EPath string + Path string + Seed *SeedInfo + type Mode string + const ModeCompat + const ModeStrict + type OpenOptions struct + AllowPartial bool + type Operation struct + DecryptSeedLoc string + Deferred bool + EncryptDate string + Entries []Mapping + EntriesMapLoc string + ID string + MapState string + Provider Provider + Relative string + Scope string + Seed SeedInfo + State string + type OperationResult struct + DecryptedEntries int + ID string + Keys []SeedResult + LockedEntries int + Recipient Recipient + Scheme string + State string + type PageSelection struct + Document string + IDs []string + type Provider struct + Company string + Name string + Version string + type Recipient struct + CertificateSHA256 string + IVDefaulted bool + UserName string + UserType string + type SeedInfo struct + ID string + Recipients []Recipient + Scheme string + type SeedResult struct + DecryptSeedLoc string + Recipient Recipient + Scheme string + type View struct + func OpenView(ctx context.Context, pkg *container.Package, opt OpenOptions, ...) (view *View, err error) + func (v *View) Close() error + func (v *View) EncryptionInfo() *Info + func (v *View) Entries() []container.Entry + func (v *View) Export(ctx context.Context, emit func(string, []byte) error) (*DecryptReport, error) + func (v *View) InputSize() int64 + func (v *View) OFDPackage() (*container.Package, error) + func (v *View) OpenPhysicalPackage() (*container.Package, error) + func (v *View) Read(name string) ([]byte, error) + func (v *View) ReadContext(ctx context.Context, name string) ([]byte, error)