Password NULL and empty

This commit is contained in:
Svetlana Kulikova
2026-01-19 17:14:26 +03:00
parent 0f85422315
commit bb4ceb14e5
20 changed files with 125 additions and 83 deletions

View File

@ -17,7 +17,7 @@ COFDFile::~COFDFile()
delete m_pInternal;
}
bool COFDFile::LoadFromFile(const std::wstring& file, const std::wstring& options, const std::wstring& owner_password, const std::wstring& user_password)
bool COFDFile::LoadFromFile(const std::wstring& file, const std::wstring& options, const wchar_t* owner_password, const wchar_t* user_password)
{
if (nullptr == m_pInternal)
return false;
@ -27,7 +27,7 @@ bool COFDFile::LoadFromFile(const std::wstring& file, const std::wstring& option
return m_pInternal->LoadFromFile(file);
}
bool COFDFile::LoadFromMemory(unsigned char* data, unsigned long length, const std::wstring& options, const std::wstring& owner_password, const std::wstring& user_password)
bool COFDFile::LoadFromMemory(unsigned char* data, unsigned long length, const std::wstring& options, const wchar_t* owner_password, const wchar_t* user_password)
{
if (nullptr == m_pInternal)
return false;

View File

@ -21,9 +21,9 @@ public:
// Open
virtual bool LoadFromFile(const std::wstring& file, const std::wstring& options = L"",
const std::wstring& owner_password = L"", const std::wstring& user_password = L"") override;
const wchar_t* owner_password = NULL, const wchar_t* user_password = NULL) override;
virtual bool LoadFromMemory(unsigned char* data, unsigned long length, const std::wstring& options = L"",
const std::wstring& owner_password = L"", const std::wstring& user_password = L"") override;
const wchar_t* owner_password = NULL, const wchar_t* user_password = NULL) override;
// Close
void Close() override;