LibreOffice Module sc (master) 1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
XclImpBiff5Decrypter Class Reference

Decrypts BIFF5 stream contents. More...

#include <xistream.hxx>

Inheritance diagram for XclImpBiff5Decrypter:
[legend]
Collaboration diagram for XclImpBiff5Decrypter:
[legend]

Public Member Functions

 XclImpBiff5Decrypter (sal_uInt16 nKey, sal_uInt16 nHash)
 
- Public Member Functions inherited from XclImpDecrypter
 XclImpDecrypter ()
 
virtual ~XclImpDecrypter () override
 
const ErrCodeGetError () 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 XclImpBiff5DecrypterOnClone () 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...
 

Detailed Description

Decrypts BIFF5 stream contents.

Definition at line 93 of file xistream.hxx.

Constructor & Destructor Documentation

◆ XclImpBiff5Decrypter() [1/2]

XclImpBiff5Decrypter::XclImpBiff5Decrypter ( sal_uInt16  nKey,
sal_uInt16  nHash 
)
explicit

Definition at line 110 of file xistream.cxx.

Referenced by OnClone().

◆ XclImpBiff5Decrypter() [2/2]

XclImpBiff5Decrypter::XclImpBiff5Decrypter ( const XclImpBiff5Decrypter rSrc)
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.

Member Function Documentation

◆ OnClone()

XclImpBiff5Decrypter * XclImpBiff5Decrypter::OnClone ( ) const
overrideprivatevirtual

Implementation of cloning this object.

Implements XclImpDecrypter.

Definition at line 126 of file xistream.cxx.

References XclImpBiff5Decrypter().

◆ OnRead()

sal_uInt16 XclImpBiff5Decrypter::OnRead ( SvStream rStrm,
sal_uInt8 pnData,
sal_uInt16  nBytes 
)
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.

◆ OnUpdate()

void XclImpBiff5Decrypter::OnUpdate ( std::size_t  nOldStrmPos,
std::size_t  nNewStrmPos,
sal_uInt16  nRecSize 
)
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().

◆ OnVerifyEncryptionData()

bool XclImpBiff5Decrypter::OnVerifyEncryptionData ( const css::uno::Sequence< css::beans::NamedValue > &  rEncryptionData)
overrideprivatevirtual

◆ OnVerifyPassword()

uno::Sequence< beans::NamedValue > XclImpBiff5Decrypter::OnVerifyPassword ( const OUString &  rPassword)
overrideprivatevirtual

Member Data Documentation

◆ maCodec

::msfilter::MSCodec_XorXLS95 XclImpBiff5Decrypter::maCodec
private

◆ maEncryptionData

css::uno::Sequence< css::beans::NamedValue > XclImpBiff5Decrypter::maEncryptionData
private

Crypto algorithm implementation.

Definition at line 115 of file xistream.hxx.

Referenced by OnVerifyEncryptionData(), OnVerifyPassword(), and XclImpBiff5Decrypter().

◆ mnHash

sal_uInt16 XclImpBiff5Decrypter::mnHash
private

Definition at line 117 of file xistream.hxx.

Referenced by OnVerifyEncryptionData(), and OnVerifyPassword().

◆ mnKey

sal_uInt16 XclImpBiff5Decrypter::mnKey
private

Definition at line 116 of file xistream.hxx.

Referenced by OnVerifyEncryptionData(), and OnVerifyPassword().


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