namespace com::sun::star::beans
{ class XMaterialHolder;
} namespace com::sun::star::uno
{ template <typename> class Reference;
}
namespace vcl::pdf
{ /** Interface for encrypting the PDF content * *Thisinterfacemakesitpossibletohavemultipleversionsand *revisionsofPDFencryption,butallusingthesameinterface, *sotheimplementationdetailsarehiddenfromtheoutside.This *alsomakesiteasiertoaddnewimplementationsinthefutureas *weonlyneedtowriteanewimplementationofthisinterface.
*/ class IPDFEncryptor
{ private: /* set to true if the following stream must be encrypted, used inside writeBuffer() */ bool m_bEncryptThisStream = false;
public: virtual ~IPDFEncryptor() {}
/** PDF encryption version */ virtual sal_Int32 getVersion() = 0; /** PDF encryption revision */ virtual sal_Int32 getRevision() = 0;
/** the numerical value of the access permissions, according to PDF spec, must be signed */ virtual sal_Int32 getAccessPermissions() = 0; virtualbool isMetadataEncrypted() = 0;
/** Length of the key in bits (i.e. 256 = 256bits) */ virtual sal_Int32 getKeyLength() = 0;
/** Prepares the encryption when the password is entered */ virtualbool prepareEncryption( const css::uno::Reference<css::beans::XMaterialHolder>& xEncryptionMaterialHolder,
PDFEncryptionProperties& rProperties)
= 0;
/** Set up the keys and does a sanity check */ virtualvoid setupKeysAndCheck(PDFEncryptionProperties& rProperties) = 0;
/** Setup before we start encrypting - remembers the key */ virtualvoid setupEncryption(std::vector<sal_uInt8>& rEncryptionKey, sal_Int32 nObject) = 0;
/** Calculate the size of the output (by default the same as input) */ virtual sal_uInt64 calculateSizeIncludingHeader(sal_uInt64 nSize) { return nSize; }
/** Encrypts the input and stores into the output */ virtualvoid encrypt(constvoid* pInput, sal_uInt64 nInputSize, std::vector<sal_uInt8>& rOutput,
sal_uInt64 nOutputSize)
= 0;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.