VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Common/Cache.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/Common/Cache.c')
-rw-r--r--src/Common/Cache.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/Common/Cache.c b/src/Common/Cache.c
index 2412ba59..4a4ebc9a 100644
--- a/src/Common/Cache.c
+++ b/src/Common/Cache.c
@@ -105,6 +105,16 @@ void AddPasswordToCache (Password *password, int pim)
cacheEmpty = 0;
}
+void AddLegacyPasswordToCache (PasswordLegacy *password, int pim)
+{
+ Password inputPass = {0};
+ inputPass.Length = password->Length;
+ memcpy (inputPass.Text, password->Text, password->Length);
+
+ AddPasswordToCache (&inputPass, pim);
+
+ burn (&inputPass, sizeof (inputPass));
+}
void WipeCache ()
{