mirror of
https://github.com/KingDuckZ/dindexer.git
synced 2024-11-29 01:33:46 +00:00
Enable uppercase hash-to-string conversion.
This commit is contained in:
parent
51d0bfdf7a
commit
e957fde12c
2 changed files with 5 additions and 2 deletions
|
@ -103,8 +103,11 @@ namespace din {
|
|||
parSizeOut = static_cast<uint64_t>(file_size);
|
||||
}
|
||||
|
||||
std::string tiger_to_string (const TigerHash& parHash) {
|
||||
std::string tiger_to_string (const TigerHash& parHash, bool parUpcase) {
|
||||
std::ostringstream oss;
|
||||
if (parUpcase) {
|
||||
oss << std::uppercase;
|
||||
}
|
||||
oss << std::hex << std::setfill('0') << std::setw(2 * sizeof(uint64_t))
|
||||
<< swap_long(parHash.part_a)
|
||||
<< std::hex << std::setfill('0') << std::setw(2 * sizeof(uint64_t))
|
||||
|
|
|
@ -41,7 +41,7 @@ namespace din {
|
|||
|
||||
void tiger_file ( const std::string& parPath, TigerHash& parHashFile, TigerHash& parHashDir, uint64_t& parSizeOut );
|
||||
void tiger_init_hash ( TigerHash& parHash );
|
||||
std::string tiger_to_string ( const TigerHash& parHash );
|
||||
std::string tiger_to_string ( const TigerHash& parHash, bool parUpcase=false );
|
||||
void tiger_data ( const std::string& parData, TigerHash& parHash );
|
||||
void tiger_data ( const std::vector<char>& parData, TigerHash& parHash );
|
||||
} //namespace din
|
||||
|
|
Loading…
Reference in a new issue