Function setPassword

Synopsis

#include <include/bitarchivehandler.hpp>

void setPassword(const wstring &password)

Description

Sets up a password to be used by the archive handler.

The password will be used to encrypt/decrypt archives by using the default cryptographic method of the archive format.

Note
Calling setPassword when the input archive is not encrypted does not have effect on the extraction process.
Note
Calling setPassword when the output format doesn't support archive encryption (e.g. GZip, BZip2, etc...) does not have any effects (in other words, it doesn't throw exceptions and it has no effects on compression operations).
Note
After a password has been set, it will be used for every subsequent operation. To disable the use of the password, you need to call the clearPassword method, which is equivalent to call setPassword(L"").
Parameters

password - the password to be used.

Source

Lines 63-65 in src/bitarchivehandler.cpp. Line 128 in include/bitarchivehandler.hpp.

void BitArchiveHandler::setPassword( const wstring& password ) {
    mPassword = password;
}





Add Discussion as Guest

Log in