1#ifndef OPENXLSX_XLCRYPTO_HPP
2#define OPENXLSX_XLCRYPTO_HPP
9#include "OpenXLSX-Exports.hpp"
28 OPENXLSX_EXPORT std::vector<uint8_t>
decryptDocument(gsl::span<const uint8_t> data,
const std::string& password);
36 OPENXLSX_EXPORT std::vector<uint8_t>
encryptDocument(gsl::span<const uint8_t> zipData,
const std::string& password);
40 std::vector<uint8_t>
readCfbStream(gsl::span<const uint8_t> data,
const std::string& streamName);
42 gsl::span<const uint8_t> encryptedPackage,
43 const std::string& password);
44 std::vector<uint8_t>
encryptStandardPackage(gsl::span<const uint8_t> zipData,
const std::string& password);
45 std::vector<uint8_t>
encryptAgilePackage(gsl::span<const uint8_t> zipData,
const std::string& password);
47 gsl::span<const uint8_t> encryptedPackage,
48 const std::string& password);
50 std::vector<uint8_t>
aes256CbcDecrypt(gsl::span<const uint8_t> data, gsl::span<const uint8_t> key, gsl::span<const uint8_t> iv);
51 std::vector<uint8_t>
sha512Hash(gsl::span<const uint8_t> data);
52 std::vector<uint8_t>
generateAgileHash(
const std::string& password, gsl::span<const uint8_t> salt,
int spinCount);
std::vector< uint8_t > encryptStandardPackage(gsl::span< const uint8_t > zipData, const std::string &password)
Definition XLCrypto.cpp:267
std::vector< uint8_t > encryptAgilePackage(gsl::span< const uint8_t > zipData, const std::string &password)
Definition XLCrypto.cpp:551
std::vector< uint8_t > decryptStandardPackage(gsl::span< const uint8_t > encryptionInfo, gsl::span< const uint8_t > encryptedPackage, const std::string &password)
Definition XLCrypto.cpp:703
std::vector< uint8_t > generateAgileHash(const std::string &password, gsl::span< const uint8_t > salt, int spinCount)
Definition XLCrypto.cpp:389
std::vector< uint8_t > readCfbStream(gsl::span< const uint8_t > data, const std::string &streamName)
Definition XLCrypto.cpp:52
std::vector< uint8_t > sha512Hash(gsl::span< const uint8_t > data)
Definition XLCrypto.cpp:387
std::vector< uint8_t > decryptAgilePackage(gsl::span< const uint8_t > encryptionInfo, gsl::span< const uint8_t > encryptedPackage, const std::string &password)
Definition XLCrypto.cpp:417
std::vector< uint8_t > aes256CbcDecrypt(gsl::span< const uint8_t > data, gsl::span< const uint8_t > key, gsl::span< const uint8_t > iv)
Definition XLCrypto.cpp:386
Definition IZipArchive.hpp:18
OPENXLSX_EXPORT std::vector< uint8_t > decryptDocument(gsl::span< const uint8_t > data, const std::string &password)
High-level API to decrypt an entire document from a buffer.
Definition XLCrypto.cpp:34
OPENXLSX_EXPORT bool isEncryptedDocument(gsl::span< const uint8_t > data)
Checks if a given byte stream represents an OLE CFB document.
Definition XLCrypto.cpp:22
OPENXLSX_EXPORT std::vector< uint8_t > encryptDocument(gsl::span< const uint8_t > zipData, const std::string &password)
High-level API to encrypt a ZIP package into a CFB container.
Definition XLCrypto.cpp:28