LibreOffice Module filter (master) 1
Public Member Functions | List of all members
msfilter::MSCodec_XorWord95 Class Referencefinal

Encodes and decodes data from protected MSO Word 95- documents. More...

#include <mscodec.hxx>

Inheritance diagram for msfilter::MSCodec_XorWord95:
[legend]
Collaboration diagram for msfilter::MSCodec_XorWord95:
[legend]

Public Member Functions

 MSCodec_XorWord95 ()
 
virtual void Decode (sal_uInt8 *pnData, std::size_t nBytes) override
 Decodes a block of memory inplace. More...
 
- Public Member Functions inherited from msfilter::MSCodec_Xor95
 MSCodec_Xor95 (int nRotateDistance)
 
virtual ~MSCodec_Xor95 ()
 
void InitKey (const sal_uInt8 pnPassData[16])
 Initializes the algorithm with the specified password. More...
 
bool InitCodec (const css::uno::Sequence< css::beans::NamedValue > &aData)
 Initializes the algorithm with the encryption data. More...
 
css::uno::Sequence< css::beans::NamedValue > GetEncryptionData ()
 Retrieves the encryption data. More...
 
bool VerifyKey (sal_uInt16 nKey, sal_uInt16 nHash) const
 Verifies the validity of the password using the passed key and hash. More...
 
void InitCipher ()
 Reinitializes the codec to start a new memory block. More...
 
virtual void Decode (sal_uInt8 *pnData, std::size_t nBytes)=0
 Decodes a block of memory inplace. More...
 
void Skip (std::size_t nBytes)
 Lets the cipher skip a specific amount of bytes. More...
 

Additional Inherited Members

- Protected Attributes inherited from msfilter::MSCodec_Xor95
sal_uInt8 mpnKey [16] = {}
 
std::size_t mnOffset
 Encryption key. More...
 

Detailed Description

Encodes and decodes data from protected MSO Word 95- documents.

Definition at line 160 of file mscodec.hxx.

Constructor & Destructor Documentation

◆ MSCodec_XorWord95()

msfilter::MSCodec_XorWord95::MSCodec_XorWord95 ( )
inlineexplicit

Definition at line 163 of file mscodec.hxx.

Member Function Documentation

◆ Decode()

void msfilter::MSCodec_XorWord95::Decode ( sal_uInt8 pnData,
std::size_t  nBytes 
)
overridevirtual

Decodes a block of memory inplace.

@precond The codec must be initialized with InitKey() before this function can be used.

Parameters
pnDataEncrypted data block. Will contain the decrypted data afterwards.
nBytesSize of the passed data block.

Implements msfilter::MSCodec_Xor95.

Definition at line 223 of file mscodec.cxx.

References msfilter::MSCodec_Xor95::mnOffset, msfilter::MSCodec_Xor95::mpnKey, and msfilter::MSCodec_Xor95::Skip().


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