LibreOffice Module sc (master) 1
Protected Member Functions | Protected Attributes | Private Member Functions | Static Private Member Functions | List of all members
XclImpBiff8Decrypter Class Reference

Decrypts BIFF8 stream contents using the given document identifier. More...

#include <xistream.hxx>

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

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_uInt8maSalt
 
std::vector< sal_uInt8maVerifier
 
std::vector< sal_uInt8maVerifierHash
 
msfilter::MSCodec97mpCodec
 

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 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
 

Detailed Description

Decrypts BIFF8 stream contents using the given document identifier.

Definition at line 121 of file xistream.hxx.

Constructor & Destructor Documentation

◆ XclImpBiff8Decrypter() [1/2]

XclImpBiff8Decrypter::XclImpBiff8Decrypter ( std::vector< sal_uInt8 > &&  rSalt,
std::vector< sal_uInt8 > &&  rVerifier,
std::vector< sal_uInt8 > &&  rVerifierHash 
)
explicitprotected

Definition at line 202 of file xistream.cxx.

◆ XclImpBiff8Decrypter() [2/2]

XclImpBiff8Decrypter::XclImpBiff8Decrypter ( const XclImpBiff8Decrypter rSrc)
explicitprotected

Definition at line 212 of file xistream.cxx.

Member Function Documentation

◆ GetBlock()

sal_uInt32 XclImpBiff8Decrypter::GetBlock ( std::size_t  nStrmPos)
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().

◆ GetOffset()

sal_uInt16 XclImpBiff8Decrypter::GetOffset ( std::size_t  nStrmPos)
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().

◆ OnRead()

sal_uInt16 XclImpBiff8Decrypter::OnRead ( SvStream rStrm,
sal_uInt8 pnData,
sal_uInt16  nBytes 
)
overrideprivatevirtual

◆ OnUpdate()

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

◆ OnVerifyEncryptionData()

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

◆ OnVerifyPassword()

uno::Sequence< beans::NamedValue > XclImpBiff8Decrypter::OnVerifyPassword ( const OUString &  rPassword)
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().

Member Data Documentation

◆ maEncryptionData

css::uno::Sequence< css::beans::NamedValue > XclImpBiff8Decrypter::maEncryptionData
protected

◆ maSalt

std::vector< sal_uInt8 > XclImpBiff8Decrypter::maSalt
protected

Definition at line 146 of file xistream.hxx.

Referenced by OnVerifyPassword().

◆ maVerifier

std::vector< sal_uInt8 > XclImpBiff8Decrypter::maVerifier
protected

Definition at line 147 of file xistream.hxx.

Referenced by OnVerifyEncryptionData(), and OnVerifyPassword().

◆ maVerifierHash

std::vector< sal_uInt8 > XclImpBiff8Decrypter::maVerifierHash
protected

Definition at line 148 of file xistream.hxx.

Referenced by OnVerifyEncryptionData(), and OnVerifyPassword().

◆ mpCodec

msfilter::MSCodec97* XclImpBiff8Decrypter::mpCodec
protected

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