38#ifndef STAR_ENCRYPTION
39# define STAR_ENCRYPTION
62 bool decode(std::vector<uint8_t> &data)
const
67 bool checkPassword(uint32_t date, uint32_t time, std::vector<uint8_t>
const &cryptDateTime)
const;
88 bool guessPassword(uint32_t date, uint32_t time, std::vector<uint8_t>
const &cryptDateTime);
105 static bool decode(std::vector<uint8_t> &data, std::vector<uint8_t>
const &cryptPasswd);
113 static bool findEncryptedPassword(std::vector<uint8_t>
const &src, std::vector<uint8_t>
const &dest, uint8_t c0c1, std::vector<uint8_t> &crypter);
the main class to read/.
Definition: StarEncryption.hxx:52
static uint8_t getMaskToDecodeStream(uint8_t src, uint8_t dest)
retrieves a mask needed to decode a stream knowing a src and dest bytes
Definition: StarEncryption.cxx:216
bool checkPassword(uint32_t date, uint32_t time, std::vector< uint8_t > const &cryptDateTime) const
checks that the password is correct
Definition: StarEncryption.cxx:101
virtual ~StarEncryption()
destructor
Definition: StarEncryption.cxx:70
bool decode(std::vector< uint8_t > &data) const
decodes a string
Definition: StarEncryption.hxx:62
StarEncryption()
constructor
Definition: StarEncryption.cxx:49
std::vector< uint8_t > m_password
the crypted password
Definition: StarEncryption.hxx:115
static bool findEncryptedPassword(std::vector< uint8_t > const &src, std::vector< uint8_t > const &dest, uint8_t c0c1, std::vector< uint8_t > &crypter)
try to find the crypter knowing the original data(16 bytes), the final data(16 bytes) and the value o...
Definition: StarEncryption.cxx:173
bool guessPassword(uint32_t date, uint32_t time, std::vector< uint8_t > const &cryptDateTime)
tries to guess the password, assuming that the user's password has at most 15 characters.
Definition: StarEncryption.cxx:119
static STOFFInputStreamPtr decodeStream(STOFFInputStreamPtr input, uint8_t mask)
decode a zone given a mask
Definition: StarEncryption.cxx:192
std::shared_ptr< STOFFInputStream > STOFFInputStreamPtr
a smart pointer of STOFFInputStream
Definition: libstaroffice_internal.hxx:489