Documentation
¶
Index ¶
- func DecryptDeepObject(objIn interface{}, objNr, genNr int, key []byte, aes bool) (*types.PDFStringLiteral, error)
- func DecryptStream(needAES bool, buf []byte, objNr, genNr int, key []byte) ([]byte, error)
- func DecryptString(needAES bool, s string, objNr, genNr int, key []byte) (*string, error)
- func EncryptDeepObject(objIn interface{}, objNr, genNr int, key []byte, aes bool) (*types.PDFStringLiteral, error)
- func EncryptStream(needAES bool, buf []byte, objNr, genNr int, key []byte) ([]byte, error)
- func EncryptString(needAES bool, s string, objNr, genNr int, key []byte) (*string, error)
- func HasNeededPermissions(enc *Encrypt) bool
- func SupportedCFEntry(d *types.PDFDict) (bool, bool)
- func ValidateOwnerPassword(ownerpw, userpw string, e *Encrypt, id []byte) (ok bool, err error)
- func ValidateUserPassword(userpw string, e *Encrypt, id []byte) (ok bool, key []byte, err error)
- func Verbose(verbose bool)
- type Encrypt
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecryptDeepObject ¶
func DecryptDeepObject(objIn interface{}, objNr, genNr int, key []byte, aes bool) (*types.PDFStringLiteral, error)
DecryptDeepObject recurses over non trivial PDF objects and decrypts all strings encountered.
func DecryptStream ¶
DecryptStream decrypts a stream buffer using RC4 or AES.
func DecryptString ¶
DecryptString decrypts s using RC4 or AES.
func EncryptDeepObject ¶
func EncryptDeepObject(objIn interface{}, objNr, genNr int, key []byte, aes bool) (*types.PDFStringLiteral, error)
EncryptDeepObject recurses over non trivial PDF objects and encrypts all strings encountered.
func EncryptStream ¶
EncryptStream encrypts a stream buffer using RC4 or AES.
func EncryptString ¶
EncryptString encrypts s using RC4 or AES.
func HasNeededPermissions ¶
HasNeededPermissions returns true if permissions for pdfcpu processing are present.
func SupportedCFEntry ¶
SupportedCFEntry returns true if all entries found entries are suppoerted.
func ValidateOwnerPassword ¶
ValidateOwnerPassword validates ownerpw.
func ValidateUserPassword ¶
ValidateUserPassword validates userpw.
Types ¶
type Encrypt ¶
type Encrypt struct {
// contains filtered or unexported fields
}
Encrypt wraps around all defined encryption attributes.
func SupportedEncryption ¶
SupportedEncryption returns true if used encryption is supported by pdfcpu.