VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Volume/EncryptionAlgorithm.cpp
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2015-01-03 23:54:24 (GMT)
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2015-01-03 23:55:36 (GMT)
commitcbc28bd4fe5e1170952d87d80f5e752bf63bd940 (patch)
tree55bf85fd2bb4aa5d0fedc5be1b62f0b12fa1b12f /src/Volume/EncryptionAlgorithm.cpp
parent9a31c238814a9e433a0b07b127503f56a9ac705a (diff)
downloadVeraCrypt-cbc28bd4fe5e1170952d87d80f5e752bf63bd940.zip
VeraCrypt-cbc28bd4fe5e1170952d87d80f5e752bf63bd940.tar.gz
Linux/MacOSX: change cascade encryption naming format in the UI as it was done on Windows.
Diffstat (limited to 'src/Volume/EncryptionAlgorithm.cpp')
-rw-r--r--src/Volume/EncryptionAlgorithm.cpp18
1 files changed, 16 insertions, 2 deletions
diff --git a/src/Volume/EncryptionAlgorithm.cpp b/src/Volume/EncryptionAlgorithm.cpp
index 3d854ae..71bf332 100644
--- a/src/Volume/EncryptionAlgorithm.cpp
+++ b/src/Volume/EncryptionAlgorithm.cpp
@@ -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;