LibreOffice Module oox (master)  1
Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
oox::crypto::AgileEngine Class Referencefinal

#include <AgileEngine.hxx>

Inheritance diagram for oox::crypto::AgileEngine:
[legend]
Collaboration diagram for oox::crypto::AgileEngine:
[legend]

Public Member Functions

 AgileEngine ()
 
AgileEncryptionInfogetInfo ()
 
void setPreset (AgileEncryptionPreset ePreset)
 
void decryptEncryptionKey (OUString const &rPassword)
 
bool decryptAndCheckVerifierHash (OUString const &rPassword)
 
bool generateEncryptionKey (OUString const &rPassword) override
 
bool readEncryptionInfo (css::uno::Reference< css::io::XInputStream > &rxInputStream) override
 
bool decrypt (BinaryXInputStream &aInputStream, BinaryXOutputStream &aOutputStream) override
 
bool checkDataIntegrity () override
 
bool decryptHmacKey ()
 
bool decryptHmacValue ()
 
void writeEncryptionInfo (BinaryXOutputStream &rStream) override
 
void encrypt (const css::uno::Reference< css::io::XInputStream > &rxInputStream, css::uno::Reference< css::io::XOutputStream > &rxOutputStream, sal_uInt32 nSize) override
 
bool setupEncryption (OUString const &rPassword) override
 
bool generateAndEncryptVerifierHash (OUString const &rPassword)
 
bool encryptHmacKey ()
 
bool encryptHmacValue ()
 
bool encryptEncryptionKey (OUString const &rPassword)
 
void setupEncryptionParameters (AgileEncryptionParameters const &rAgileEncryptionParameters)
 
bool setupEncryptionKey (OUString const &rPassword)
 
- Public Member Functions inherited from oox::crypto::CryptoEngine
 CryptoEngine ()
 
virtual ~CryptoEngine ()
 
virtual bool generateEncryptionKey (const OUString &rPassword)=0
 
virtual bool setupEncryption (const OUString &rPassword)=0
 

Private Member Functions

void calculateHashFinal (const OUString &rPassword, std::vector< sal_uInt8 > &aHashFinal)
 
void calculateBlock (std::vector< sal_uInt8 > const &rBlock, std::vector< sal_uInt8 > &rHashFinal, std::vector< sal_uInt8 > &rInput, std::vector< sal_uInt8 > &rOutput)
 
void encryptBlock (std::vector< sal_uInt8 > const &rBlock, std::vector< sal_uInt8 > &rHashFinal, std::vector< sal_uInt8 > &rInput, std::vector< sal_uInt8 > &rOutput)
 

Static Private Member Functions

static Crypto::CryptoType cryptoType (const AgileEncryptionInfo &rInfo)
 

Private Attributes

AgileEncryptionInfo mInfo
 
AgileEncryptionPreset meEncryptionPreset
 

Additional Inherited Members

- Protected Attributes inherited from oox::crypto::CryptoEngine
std::vector< sal_uInt8mKey
 

Detailed Description

Definition at line 76 of file AgileEngine.hxx.

Constructor & Destructor Documentation

oox::crypto::AgileEngine::AgileEngine ( )

Definition at line 224 of file AgileEngine.cxx.

References oox::crypto::AES_256_SHA512.

Member Function Documentation

void oox::crypto::AgileEngine::calculateBlock ( std::vector< sal_uInt8 > const &  rBlock,
std::vector< sal_uInt8 > &  rHashFinal,
std::vector< sal_uInt8 > &  rInput,
std::vector< sal_uInt8 > &  rOutput 
)
private

Definition at line 250 of file AgileEngine.cxx.

References cryptoType().

Referenced by decryptAndCheckVerifierHash(), and decryptEncryptionKey().

void oox::crypto::AgileEngine::calculateHashFinal ( const OUString &  rPassword,
std::vector< sal_uInt8 > &  aHashFinal 
)
private
bool oox::crypto::AgileEngine::checkDataIntegrity ( )
overridevirtual

Implements oox::crypto::CryptoEngine.

Definition at line 423 of file AgileEngine.cxx.

Crypto::CryptoType oox::crypto::AgileEngine::cryptoType ( const AgileEncryptionInfo rInfo)
staticprivate
bool oox::crypto::AgileEngine::decrypt ( BinaryXInputStream aInputStream,
BinaryXOutputStream aOutputStream 
)
overridevirtual
bool oox::crypto::AgileEngine::decryptAndCheckVerifierHash ( OUString const &  rPassword)

Definition at line 319 of file AgileEngine.cxx.

References calculateBlock(), calculateHashFinal(), and oox::crypto::roundUp().

Referenced by generateEncryptionKey().

void oox::crypto::AgileEngine::decryptEncryptionKey ( OUString const &  rPassword)
bool oox::crypto::AgileEngine::decryptHmacKey ( )
bool oox::crypto::AgileEngine::decryptHmacValue ( )
void oox::crypto::AgileEngine::encrypt ( const css::uno::Reference< css::io::XInputStream > &  rxInputStream,
css::uno::Reference< css::io::XOutputStream > &  rxOutputStream,
sal_uInt32  nSize 
)
overridevirtual
void oox::crypto::AgileEngine::encryptBlock ( std::vector< sal_uInt8 > const &  rBlock,
std::vector< sal_uInt8 > &  rHashFinal,
std::vector< sal_uInt8 > &  rInput,
std::vector< sal_uInt8 > &  rOutput 
)
private

Definition at line 272 of file AgileEngine.cxx.

References cryptoType().

Referenced by encryptEncryptionKey(), and generateAndEncryptVerifierHash().

bool oox::crypto::AgileEngine::encryptEncryptionKey ( OUString const &  rPassword)
bool oox::crypto::AgileEngine::encryptHmacKey ( )
bool oox::crypto::AgileEngine::encryptHmacValue ( )
bool oox::crypto::AgileEngine::generateAndEncryptVerifierHash ( OUString const &  rPassword)

Definition at line 561 of file AgileEngine.cxx.

References calculateHashFinal(), encryptBlock(), and oox::crypto::roundUp().

Referenced by setupEncryptionKey().

bool oox::crypto::AgileEngine::generateEncryptionKey ( OUString const &  rPassword)
override
AgileEncryptionInfo& oox::crypto::AgileEngine::getInfo ( )
inline

Definition at line 101 of file AgileEngine.hxx.

References mInfo.

bool oox::crypto::AgileEngine::readEncryptionInfo ( css::uno::Reference< css::io::XInputStream > &  rxInputStream)
overridevirtual
void oox::crypto::AgileEngine::setPreset ( AgileEncryptionPreset  ePreset)
inline

Definition at line 103 of file AgileEngine.hxx.

bool oox::crypto::AgileEngine::setupEncryption ( OUString const &  rPassword)
override
bool oox::crypto::AgileEngine::setupEncryptionKey ( OUString const &  rPassword)
void oox::crypto::AgileEngine::setupEncryptionParameters ( AgileEncryptionParameters const &  rAgileEncryptionParameters)
void oox::crypto::AgileEngine::writeEncryptionInfo ( BinaryXOutputStream rStream)
overridevirtual

Member Data Documentation

AgileEncryptionPreset oox::crypto::AgileEngine::meEncryptionPreset
private

Definition at line 80 of file AgileEngine.hxx.

Referenced by setupEncryption().

AgileEncryptionInfo oox::crypto::AgileEngine::mInfo
private

Definition at line 79 of file AgileEngine.hxx.


The documentation for this class was generated from the following files: