本文整理汇总了C++中path::create_folderpath方法的典型用法代码示例。如果您正苦于以下问题:C++ path::create_folderpath方法的具体用法?C++ path::create_folderpath怎么用?C++ path::create_folderpath使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类path
的用法示例。
在下文中一共展示了path::create_folderpath方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: HashFilter
Container::Container(const path& location, const std::string& pw, VirtualDisk_Impl::volume_handle* volume, encryption_algorithm algo) : volume_(volume),
passphrase_(pw.begin(), pw.end()), seed_(32), is_syncing(false), container_open_(false), has_callback_(false)
{
using namespace CryptoPP;
SHA256 shafunc;
StringSource(pw.data(), true, new HashFilter(shafunc, new StringSink(pw_)));
container_name_ = location.get_filename();
container_name_.erase(container_name_.find_first_of('.'), container_name_.size());
path_ = location;
location.create_folderpath();
algo_ = algo;
if (enhanced_passphrase_.size())
{
std::vector<byte> tmp(std::begin(pw), std::end(pw));
tmp.insert(std::end(tmp), std::begin(enhanced_passphrase_), std::end(enhanced_passphrase_));
std::swap(tmp, enhanced_passphrase_);
}
else
{
for (byte b : pw)
{
enhanced_passphrase_.push_back(b);
}
}
}
示例2: init
void Container::init(const path& location, const std::string& pw, encryption_algorithm algo)
{
using namespace CryptoPP;
send_callback(VERBOSE, INIT_CONTAINER, location.std_str());
SHA256 shafunc;
StringSource(pw.data(), true, new HashFilter(shafunc, new StringSink(pw_)));
if (enhanced_passphrase_.size())
{
std::vector<byte> tmp(std::begin(pw), std::end(pw));
tmp.insert(std::end(tmp), std::begin(enhanced_passphrase_), std::end(enhanced_passphrase_));
std::swap(tmp, enhanced_passphrase_);
}
else
{
for (byte b : pw)
{
enhanced_passphrase_.push_back(b);
}
}
container_name_ = location.get_filename();
container_name_.erase(container_name_.find_first_of('.'), container_name_.size());
path_ = location; //fehler filename muss noch raus aus dem string
location.create_folderpath();
algo_ = algo;
}