11#ifndef INCLUDED_OOX_CRYPTO_AGILEENGINE_HXX
12#define INCLUDED_OOX_CRYPTO_AGILEENGINE_HXX
19#include <rtl/ustring.hxx>
23 class BinaryXInputStream;
24 class BinaryXOutputStream;
82 void calculateHashFinal(
const OUString& rPassword, std::vector<sal_uInt8>& aHashFinal);
85 std::vector<sal_uInt8>
const & rBlock,
86 std::vector<sal_uInt8>& rHashFinal,
87 std::vector<sal_uInt8>& rInput,
88 std::vector<sal_uInt8>& rOutput);
91 std::vector<sal_uInt8>
const & rBlock,
92 std::vector<sal_uInt8>& rHashFinal,
93 std::vector<sal_uInt8>& rInput,
94 std::vector<sal_uInt8>& rOutput);
105 meEncryptionPreset = ePreset;
110 void decryptEncryptionKey(OUString
const & rPassword);
111 bool decryptAndCheckVerifierHash(OUString
const & rPassword);
113 bool generateEncryptionKey(OUString
const & rPassword)
override;
114 bool readEncryptionInfo(css::uno::Reference<css::io::XInputStream> & rxInputStream)
override;
118 bool checkDataIntegrity()
override;
120 bool decryptHmacKey();
121 bool decryptHmacValue();
127 void encrypt(
const css::uno::Reference<css::io::XInputStream>& rxInputStream,
128 css::uno::Reference<css::io::XOutputStream>& rxOutputStream,
129 sal_uInt32 nSize)
override;
131 bool setupEncryption(OUString
const & rPassword)
override;
133 bool generateAndEncryptVerifierHash(OUString
const & rPassword);
135 bool encryptHmacKey();
136 bool encryptHmacValue();
138 bool encryptEncryptionKey(OUString
const & rPassword);
140 bool setupEncryptionKey(OUString
const & rPassword);
AgileEncryptionInfo & mInfo
Wraps a UNO output stream and provides convenient access functions.
AgileEncryptionPreset meEncryptionPreset
AgileEncryptionInfo & getInfo()
void setPreset(AgileEncryptionPreset ePreset)
AgileEncryptionInfo mInfo
std::vector< sal_uInt8 > hmacEncryptedKey
std::vector< sal_uInt8 > hmacCalculatedHash
std::vector< sal_uInt8 > hmacKey
std::vector< sal_uInt8 > encryptedVerifierHashInput
std::vector< sal_uInt8 > keyDataSalt
std::vector< sal_uInt8 > encryptedKeyValue
std::vector< sal_uInt8 > saltValue
std::vector< sal_uInt8 > encryptedVerifierHashValue
std::vector< sal_uInt8 > hmacEncryptedValue
std::vector< sal_uInt8 > hmacHash