Generate encryption key

Eike Rathke erack at
Tue Jul 24 10:21:19 UTC 2018

Hi Vikas,

On Tuesday, 2018-07-24 09:05:09 +0530, Vikas Mahato wrote:

> I wanted to know how can we generate the encryption key for using wit
> include/oox/crypto/CryptTools.hxx classes?

As Toma┼ż said, it may depend on what you're actually up to..
Likely you do not want to use the CryptTool Encrypt/Decrypt wrappers

If it is for OOXML encryption there are two engines derived from
CryptoEngine of include/oox/crypto/CryptoEngine.hxx, AgileEngine of
include/oox/crypto/AgileEngine.hxx and the older Standard2007Engine of

The engines provide a generateEncryptionKey() function, which is called
by an engine's setupEncryption(const OUString& rPassword) after presets
have been initialized, for usage see for example


LibreOffice Calc developer. Number formatter stricken i18n transpositionizer.
GPG key 0x6A6CD5B765632D3A - 2265 D7F3 A7B0 95CC 3918  630B 6A6C D5B7 6563 2D3A
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <>

More information about the LibreOffice mailing list