LibreOffice
LibreOffice 24.2 SDK API Reference
|
Allows to transparently plug-in crypto for PackageStreams. More...
import"XPackageEncryption.idl";
Public Member Functions | |
boolean | readEncryptionInfo ([in] sequence< com::sun::star::beans::NamedValue > rStreams) |
Read package crypto information. More... | |
boolean | generateEncryptionKey ([in] string rPassword) |
Set or refresh encryption key. More... | |
boolean | decrypt ([in] com::sun::star::io::XInputStream rxInputStream, [out] com::sun::star::io::XOutputStream rxOutputStream) |
Decrypt document content. More... | |
sequence< com::sun::star::beans::NamedValue > | createEncryptionData ([in] string rPassword) |
Create key-value list of encryption meta data. More... | |
boolean | setupEncryption ([in] sequence< com::sun::star::beans::NamedValue > rMediaEncData) |
Set key-value list of encryption meta data. More... | |
sequence< com::sun::star::beans::NamedValue > | encrypt ([in] com::sun::star::io::XInputStream rxInputStream) |
Encrypt given stream. More... | |
boolean | checkDataIntegrity () |
Check if decryption meta data is valid. More... | |
Public Member Functions inherited from XInterface | |
any | queryInterface ([in] type aType) |
queries for a new interface to an existing UNO object. More... | |
void | acquire () |
increases the reference counter by one. More... | |
void | release () |
decreases the reference counter by one. More... | |
Allows to transparently plug-in crypto for PackageStreams.
boolean checkDataIntegrity | ( | ) |
Check if decryption meta data is valid.
Some implementations might for example check HMAC values here. Call this before trusting encrypted data.
sequence<com::sun::star::beans::NamedValue> createEncryptionData | ( | [in] string | rPassword | ) |
Create key-value list of encryption meta data.
After generateEncryptionKey() succeeded in setting up crypto, use this method to create requisite meta data. Depending on underlying crypto, this can be a salt, init vector, or other algorithm-specific information that needs to be stored alongside an encrypted document
rPassword | Same password as provided to generateEncryptionKey |
boolean decrypt | ( | [in] com::sun::star::io::XInputStream | rxInputStream, |
[out] com::sun::star::io::XOutputStream | rxOutputStream | ||
) |
Decrypt document content.
After crypto setup via readEncryptionInfo(), pipe package bits through encryption engine.
rxInputStream | Input data (encrypted) |
rxOutputStream | Output data (decrypted) |
sequence<com::sun::star::beans::NamedValue> encrypt | ( | [in] com::sun::star::io::XInputStream | rxInputStream | ) |
Encrypt given stream.
After setting up crypto via setupEncryption(), use this method to encrypt content.
boolean generateEncryptionKey | ( | [in] string | rPassword | ) |
Set or refresh encryption key.
rPassword | Optional password to use for generating encryption key. |
boolean readEncryptionInfo | ( | [in] sequence< com::sun::star::beans::NamedValue > | rStreams | ) |
Read package crypto information.
rStreams | Substreams of the package (in the case of MS encryption, those are OLE substorage streams). |
boolean setupEncryption | ( | [in] sequence< com::sun::star::beans::NamedValue > | rMediaEncData | ) |
Set key-value list of encryption meta data.
Use this method to setup requisite encryption meta data. Depending on the underlying crypto, this can be a salt, init vector, or other algorithm-specific information that needs to be stored alongside an encrypted document