From cbc28bd4fe5e1170952d87d80f5e752bf63bd940 Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Sun, 4 Jan 2015 00:54:24 +0100 Subject: Linux/MacOSX: change cascade encryption naming format in the UI as it was done on Windows. --- src/Volume/EncryptionAlgorithm.cpp | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'src/Volume/EncryptionAlgorithm.cpp') diff --git a/src/Volume/EncryptionAlgorithm.cpp b/src/Volume/EncryptionAlgorithm.cpp index 3d854ae5..71bf332c 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; -- cgit v1.2.3