mirror of
https://github.com/veracrypt/VeraCrypt.git
synced 2025-11-12 19:38:26 -06:00
Linux/MacOSX: change cascade encryption naming format in the UI as it was done on Windows.
This commit is contained in:
@@ -125,19 +125,33 @@ namespace VeraCrypt
|
||||
return Mode;
|
||||
}
|
||||
|
||||
wstring EncryptionAlgorithm::GetName () const
|
||||
wstring EncryptionAlgorithm::GetName (bool forGuiDisplay) const
|
||||
{
|
||||
if (Ciphers.size() < 1)
|
||||
throw NotInitialized (SRC_POS);
|
||||
|
||||
wstring name;
|
||||
|
||||
int depth = 0;
|
||||
foreach_reverse_ref (const Cipher &c, Ciphers)
|
||||
{
|
||||
if (name.empty())
|
||||
name = c.GetName();
|
||||
else
|
||||
name += wstring (L"-") + c.GetName();
|
||||
{
|
||||
depth++;
|
||||
if (forGuiDisplay)
|
||||
name += wstring (L"(");
|
||||
else
|
||||
name += wstring (L"-");
|
||||
name += c.GetName();
|
||||
}
|
||||
}
|
||||
|
||||
if (forGuiDisplay && depth)
|
||||
{
|
||||
for (int i = 0; i < depth; i++)
|
||||
name += wstring(L")");
|
||||
}
|
||||
|
||||
return name;
|
||||
|
||||
Reference in New Issue
Block a user