LibreOffice Module sc (master) 1
|
Decrypts BIFF5 stream contents. More...
#include <xistream.hxx>
Public Member Functions | |
XclImpBiff5Decrypter (sal_uInt16 nKey, sal_uInt16 nHash) | |
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 |
Private Member Functions | |
XclImpBiff5Decrypter (const XclImpBiff5Decrypter &rSrc) | |
Private copy c'tor for OnClone(). More... | |
virtual XclImpBiff5Decrypter * | OnClone () const override |
Implementation of cloning this object. More... | |
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... | |
Private Attributes | |
::msfilter::MSCodec_XorXLS95 | maCodec |
css::uno::Sequence< css::beans::NamedValue > | maEncryptionData |
Crypto algorithm implementation. More... | |
sal_uInt16 | mnKey |
sal_uInt16 | mnHash |
Additional Inherited Members | |
Protected Member Functions inherited from XclImpDecrypter | |
XclImpDecrypter (const XclImpDecrypter &rSrc) | |
Protected copy c'tor for OnClone(). More... | |
Decrypts BIFF5 stream contents.
Definition at line 93 of file xistream.hxx.
|
explicit |
Definition at line 110 of file xistream.cxx.
Referenced by OnClone().
|
explicitprivate |
Private copy c'tor for OnClone().
Definition at line 116 of file xistream.cxx.
References msfilter::MSCodec_Xor95::InitCodec(), XclImpDecrypter::IsValid(), maCodec, and maEncryptionData.
|
overrideprivatevirtual |
Implementation of cloning this object.
Implements XclImpDecrypter.
Definition at line 126 of file xistream.cxx.
References XclImpBiff5Decrypter().
|
overrideprivatevirtual |
Implementation of the decryption.
Implements XclImpDecrypter.
Definition at line 195 of file xistream.cxx.
References msfilter::MSCodec_XorXLS95::Decode(), maCodec, SvStream::ReadBytes(), and rStrm.
|
overrideprivatevirtual |
Implementation of updating the decrypter.
Implements XclImpDecrypter.
Definition at line 189 of file xistream.cxx.
References msfilter::MSCodec_Xor95::InitCipher(), maCodec, and msfilter::MSCodec_Xor95::Skip().
|
overrideprivatevirtual |
Implements XclImpDecrypter.
Definition at line 173 of file xistream.cxx.
References msfilter::MSCodec_Xor95::InitCodec(), maCodec, maEncryptionData, mnHash, mnKey, and msfilter::MSCodec_Xor95::VerifyKey().
|
overrideprivatevirtual |
Implements password verification and initialization of the decoder.
Implements XclImpDecrypter.
Definition at line 131 of file xistream.cxx.
References comphelper::DocPasswordHelper::GenerateRandomByteSequence(), msfilter::MSCodec97::GetEncryptionData(), msfilter::MSCodec_Xor95::GetEncryptionData(), msfilter::MSCodec_Std97::InitKey(), msfilter::MSCodec_Xor95::InitKey(), maCodec, maEncryptionData, mnHash, mnKey, OUStringToOString(), comphelper::SequenceAsHashMap::update(), and msfilter::MSCodec_Xor95::VerifyKey().
|
private |
Definition at line 114 of file xistream.hxx.
Referenced by OnRead(), OnUpdate(), OnVerifyEncryptionData(), OnVerifyPassword(), and XclImpBiff5Decrypter().
|
private |
Crypto algorithm implementation.
Definition at line 115 of file xistream.hxx.
Referenced by OnVerifyEncryptionData(), OnVerifyPassword(), and XclImpBiff5Decrypter().
|
private |
Definition at line 117 of file xistream.hxx.
Referenced by OnVerifyEncryptionData(), and OnVerifyPassword().
|
private |
Definition at line 116 of file xistream.hxx.
Referenced by OnVerifyEncryptionData(), and OnVerifyPassword().