LibreOffice Module sc (master) 1
|
Decrypts BIFF8 stream contents using the given document identifier. More...
#include <xistream.hxx>
Protected Member Functions | |
XclImpBiff8Decrypter (std::vector< sal_uInt8 > &&rSalt, std::vector< sal_uInt8 > &&rVerifier, std::vector< sal_uInt8 > &&rVerifierHash) | |
XclImpBiff8Decrypter (const XclImpBiff8Decrypter &rSrc) | |
Protected Member Functions inherited from XclImpDecrypter | |
XclImpDecrypter (const XclImpDecrypter &rSrc) | |
Protected copy c'tor for OnClone(). More... | |
Protected Attributes | |
css::uno::Sequence< css::beans::NamedValue > | maEncryptionData |
std::vector< sal_uInt8 > | maSalt |
std::vector< sal_uInt8 > | maVerifier |
std::vector< sal_uInt8 > | maVerifierHash |
msfilter::MSCodec97 * | mpCodec |
Private Member Functions | |
virtual css::uno::Sequence< css::beans::NamedValue > | OnVerifyPassword (const OUString &rPassword) override |
Implements password verification and initialization of the decoder. More... | |
virtual bool | OnVerifyEncryptionData (const css::uno::Sequence< css::beans::NamedValue > &rEncryptionData) override |
virtual void | OnUpdate (std::size_t nOldStrmPos, std::size_t nNewStrmPos, sal_uInt16 nRecSize) override |
Implementation of updating the decrypter. More... | |
virtual sal_uInt16 | OnRead (SvStream &rStrm, sal_uInt8 *pnData, sal_uInt16 nBytes) override |
Implementation of the decryption. More... | |
Static Private Member Functions | |
static sal_uInt32 | GetBlock (std::size_t nStrmPos) |
Returns the block number corresponding to the passed stream position. More... | |
static sal_uInt16 | GetOffset (std::size_t nStrmPos) |
Returns the block offset corresponding to the passed stream position. More... | |
Additional Inherited Members | |
Public Member Functions inherited from XclImpDecrypter | |
XclImpDecrypter () | |
virtual | ~XclImpDecrypter () override |
const ErrCode & | GetError () const |
Returns the current error code of the decrypter. More... | |
bool | IsValid () const |
Returns true, if the decoder has been initialized correctly. More... | |
XclImpDecrypterRef | Clone () const |
Creates a (ref-counted) copy of this decrypter object. More... | |
virtual ::comphelper::DocPasswordVerifierResult | verifyPassword (const OUString &rPassword, css::uno::Sequence< css::beans::NamedValue > &o_rEncryptionData) override |
Implementation of the comphelper::IDocPasswordVerifier interface. More... | |
virtual ::comphelper::DocPasswordVerifierResult | verifyEncryptionData (const css::uno::Sequence< css::beans::NamedValue > &rEncryptionData) override |
void | Update (const SvStream &rStrm, sal_uInt16 nRecSize) |
Updates the decrypter on start of a new record or after seeking stream. More... | |
sal_uInt16 | Read (SvStream &rStrm, void *pData, sal_uInt16 nBytes) |
Reads and decrypts nBytes bytes and stores data into the existing(!) buffer pData. More... | |
Public Member Functions inherited from comphelper::IDocPasswordVerifier | |
virtual | ~IDocPasswordVerifier () |
virtual DocPasswordVerifierResult | verifyPassword (const OUString &rPassword, css::uno::Sequence< css::beans::NamedValue > &o_rEncryptionData)=0 |
virtual DocPasswordVerifierResult | verifyEncryptionData (const css::uno::Sequence< css::beans::NamedValue > &o_rEncryptionData)=0 |
Decrypts BIFF8 stream contents using the given document identifier.
Definition at line 121 of file xistream.hxx.
|
explicitprotected |
Definition at line 202 of file xistream.cxx.
|
explicitprotected |
Definition at line 212 of file xistream.cxx.
|
staticprivate |
Returns the block number corresponding to the passed stream position.
Definition at line 337 of file xistream.cxx.
References EXC_ENCR_BLOCKSIZE.
Referenced by OnRead(), and OnUpdate().
|
staticprivate |
Returns the block offset corresponding to the passed stream position.
Definition at line 342 of file xistream.cxx.
References EXC_ENCR_BLOCKSIZE.
Referenced by OnRead(), and OnUpdate().
|
overrideprivatevirtual |
Implementation of the decryption.
Implements XclImpDecrypter.
Definition at line 312 of file xistream.cxx.
References msfilter::MSCodec97::Decode(), EXC_ENCR_BLOCKSIZE, GetBlock(), GetOffset(), msfilter::MSCodec97::InitCipher(), mpCodec, SvStream::ReadBytes(), rStrm, and SvStream::Tell().
|
overrideprivatevirtual |
Implementation of updating the decrypter.
Implements XclImpDecrypter.
Definition at line 289 of file xistream.cxx.
References GetBlock(), GetOffset(), msfilter::MSCodec97::InitCipher(), mpCodec, and msfilter::MSCodec97::Skip().
|
overrideprivatevirtual |
Implements XclImpDecrypter.
Definition at line 273 of file xistream.cxx.
References msfilter::MSCodec97::InitCodec(), maEncryptionData, maVerifier, maVerifierHash, mpCodec, and msfilter::MSCodec97::VerifyKey().
|
overrideprivatevirtual |
Implements password verification and initialization of the decoder.
Implements XclImpDecrypter.
Definition at line 248 of file xistream.cxx.
References msfilter::MSCodec97::GetEncryptionData(), msfilter::MSCodec97::InitKey(), maEncryptionData, maSalt, maVerifier, maVerifierHash, mpCodec, and msfilter::MSCodec97::VerifyKey().
|
protected |
Definition at line 145 of file xistream.hxx.
Referenced by OnVerifyEncryptionData(), OnVerifyPassword(), XclImpBiff8CryptoAPIDecrypter::XclImpBiff8CryptoAPIDecrypter(), and XclImpBiff8StdDecrypter::XclImpBiff8StdDecrypter().
|
protected |
Definition at line 146 of file xistream.hxx.
Referenced by OnVerifyPassword().
|
protected |
Definition at line 147 of file xistream.hxx.
Referenced by OnVerifyEncryptionData(), and OnVerifyPassword().
|
protected |
Definition at line 148 of file xistream.hxx.
Referenced by OnVerifyEncryptionData(), and OnVerifyPassword().
|
protected |
Definition at line 149 of file xistream.hxx.
Referenced by OnRead(), OnUpdate(), OnVerifyEncryptionData(), OnVerifyPassword(), XclImpBiff8CryptoAPIDecrypter::XclImpBiff8CryptoAPIDecrypter(), and XclImpBiff8StdDecrypter::XclImpBiff8StdDecrypter().