[Pkg-cli-apps-commits] [SCM] keepass2 branch, upstream, updated. upstream/2.19-2-g6c6de0e
Julian Taylor
jtaylor.debian at googlemail.com
Sat Oct 6 12:44:29 UTC 2012
The following commit has been merged in the upstream branch:
commit 6c6de0ef9b0baf5bb3eb82e5f03ab93d6a371333
Author: Julian Taylor <jtaylor.debian at googlemail.com>
Date: Sat Oct 6 14:20:11 2012 +0200
Imported Upstream version 2.20.1
diff --git a/Build/KeePassLibSD_Distrib/KeePassLibSD.dll b/Build/KeePassLibSD_Distrib/KeePassLibSD.dll
index b4eb0bd..b4a7e27 100644
Binary files a/Build/KeePassLibSD_Distrib/KeePassLibSD.dll and b/Build/KeePassLibSD_Distrib/KeePassLibSD.dll differ
diff --git a/Build/KeePassLib_Distrib/KeePassLib.dll b/Build/KeePassLib_Distrib/KeePassLib.dll
index 0b8797d..961d4e7 100644
Binary files a/Build/KeePassLib_Distrib/KeePassLib.dll and b/Build/KeePassLib_Distrib/KeePassLib.dll differ
diff --git a/Docs/Chm/help/base/cmdline.html b/Docs/Chm/help/base/cmdline.html
index 1c16d89..fa5e78a 100644
--- a/Docs/Chm/help/base/cmdline.html
+++ b/Docs/Chm/help/base/cmdline.html
@@ -64,8 +64,8 @@ example: <code>-pw:"my secret password"</code>.</p>
security reasons (the operating system allows reading the command line
options of other applications).</p>
-<p>When passing the <code>-pw-stdin</code> option, KeePass ≥ 1.24 and ≥ 2.20
-read the password from the StdIn stream.</p>
+<p>When passing the <code>-pw-stdin</code> option, KeePass
+reads the password from the StdIn stream.</p>
<p><b>Key file.</b>
For supplying the key file location, the <code>-keyfile:</code> switch
diff --git a/Docs/History.txt b/Docs/History.txt
index 56e5a9d..61575d6 100644
--- a/Docs/History.txt
+++ b/Docs/History.txt
@@ -1,3 +1,25 @@
+2012-10-04: 2.20.1
+- Improved support for images with DPI resolutions different
+ from the DPI resolution of the display device
+- {GOOGLECHROME} placeholder: updated detection code to also
+ support the latest versions of Chrome
+- The option to lock on remote control mode changes now
+ additionally watches for remote connects and disconnects
+- Improved Windows registry accesses
+- Improved behavior when the user deletes the system temporary
+ directory
+- On Unix-like systems, KeePass now stores most of its
+ temporary files in a private temporary directory (preferably
+ in $XDG_RUNTIME_DIR)
+- Added detection support for the following web browsers on
+ Unix-like systems: Rekonq, Midori and Dooble
+- KeePass does not try to set the WM_CLASS property on Mac OS X
+ systems anymore
+- Modified some icons to work around unsupported PNG
+ transparency keys in Mono
+- Various code optimizations
+- Minor other improvements
+
2012-09-08: 2.20
- Header data in KDBX files is now authenticated (to prevent
silent data corruption attacks; thanks to P. Gasti and K. B.
diff --git a/Ext/DeprecatedSources/AppConfigEx.cs b/Ext/DeprecatedSources/AppConfigEx.cs
deleted file mode 100644
index 7d29452..0000000
--- a/Ext/DeprecatedSources/AppConfigEx.cs
+++ /dev/null
@@ -1,632 +0,0 @@
-/*
- KeePass Password Safe - The Open-Source Password Manager
- Copyright (C) 2003-2009 Dominik Reichl <dominik.reichl at t-online.de>
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-*/
-
-#if KeePassLibSD
-using System;
-using System.Collections.Generic;
-using System.Text;
-using System.IO;
-using System.Xml;
-using System.Reflection;
-using System.Diagnostics;
-
-using KeePassLib;
-
-#if KeePassLibSD
-using KeePassLibSD;
-#endif
-
-namespace KeePassLib.Utility
-{
- /// <summary>
- /// Implements a cascading configuration class (singleton). Application settings
- /// are first tried to be loaded from the global configuration file. If the
- /// requested configuration key isn't found, it is loaded from the user
- /// configuration file (stored in the user directory).
- /// </summary>
- public static class AppConfigEx
- {
- private static SortedDictionary<string, string> m_cfgCurrent =
- new SortedDictionary<string, string>();
-
- private static bool m_bModified = false;
-
- private static string m_strGlobalConfigFile = null;
- private static string m_strUserConfigFile = null;
- private static string m_strCreateDir = null;
-
- private static string m_strBaseName = null;
-
- private const string RootElementName = "Configuration";
- private const string ConfigItemElement = "Item";
- private const string ConfigItemName = "Name";
- private const string ConfigItemValue = "Value";
-
- private const string ValTrue = "True";
- private const string ValFalse = "False";
-
- /// <summary>
- /// Get/set the base name for the configuration. If this property is
- /// <c>null</c>, the class constructs names based on the current
- /// assembly and the product name.
- /// </summary>
- public static string BaseName
- {
- get { return m_strBaseName; }
-
- set
- {
- m_strBaseName = value;
-
- m_strGlobalConfigFile = null; // Invalidate paths
- m_strUserConfigFile = null;
- m_strCreateDir = null;
- }
- }
-
- /// <summary>
- /// Load configuration. This method will load configuration information
- /// from several different files (global configuration file in application
- /// directory, configuration file in user directory, etc.) and mix them
- /// into one in-memory configuration pool.
- /// <param name="strBaseName">Base name for the configuration files and
- /// directories. For example, this could be "KeePass".</param>
- /// </summary>
- public static void Load()
- {
- GetConfigPaths();
-
- SortedDictionary<string, string> dictGlobal;
- LoadFile(m_strGlobalConfigFile, out dictGlobal);
- Debug.Assert(dictGlobal != null);
-
- SortedDictionary<string, string> dictUser;
- LoadFile(m_strUserConfigFile, out dictUser);
- Debug.Assert(dictUser != null);
-
- // Combine global and user options. Global options override user options.
- m_cfgCurrent = dictGlobal;
- foreach(KeyValuePair<string, string> kvp in dictUser)
- {
- if(!m_cfgCurrent.ContainsKey(kvp.Key))
- m_cfgCurrent[kvp.Key] = kvp.Value;
- }
-
- m_bModified = false;
- }
-
- private static void GetConfigPaths()
- {
- if(m_strGlobalConfigFile == null)
- {
- Assembly asm = Assembly.GetExecutingAssembly();
- Debug.Assert(asm != null); if(asm == null) return;
-
-#if !KeePassLibSD
- string strFile = null;
-
- try { strFile = asm.Location; }
- catch(Exception) { }
-
- if((strFile == null) || (strFile.Length == 0))
- strFile = UrlUtil.FileUrlToPath(asm.GetName().CodeBase);
-#else
- string strFile = UrlUtil.FileUrlToPath(asm.GetName().CodeBase);
-#endif
- Debug.Assert(strFile != null); if(strFile == null) return;
-
- if((m_strBaseName == null) || (m_strBaseName.Length == 0))
- {
- // Remove assembly extension
- if(strFile.EndsWith(".exe", StringComparison.OrdinalIgnoreCase))
- strFile = strFile.Substring(0, strFile.Length - 4);
- else if(strFile.EndsWith(".dll", StringComparison.OrdinalIgnoreCase))
- strFile = strFile.Substring(0, strFile.Length - 4);
- }
- else // Base name != null
- {
- strFile = UrlUtil.GetFileDirectory(strFile, true) + m_strBaseName;
- }
-
- m_strGlobalConfigFile = strFile + ".config.xml";
- }
-
- if(m_strUserConfigFile == null)
- {
- string strBaseDirName = PwDefs.ShortProductName;
- if((m_strBaseName != null) && (m_strBaseName.Length > 0))
- strBaseDirName = m_strBaseName;
-
- string strUserDir;
- try
- {
- strUserDir = Environment.GetFolderPath(
- Environment.SpecialFolder.ApplicationData);
- }
- catch(Exception)
- {
- strUserDir = UrlUtil.GetFileDirectory(UrlUtil.FileUrlToPath(
- Assembly.GetExecutingAssembly().GetName().CodeBase), true);
- }
-
- if((!strUserDir.EndsWith(new string(Path.DirectorySeparatorChar, 1))) &&
- (!strUserDir.EndsWith("\\")) && (!strUserDir.EndsWith("/")))
- {
- strUserDir += new string(Path.DirectorySeparatorChar, 1);
- }
-
- m_strCreateDir = strUserDir + strBaseDirName;
- m_strUserConfigFile = m_strCreateDir + Path.DirectorySeparatorChar +
- strBaseDirName + ".config.xml";
- }
- }
-
- private static void EnsureAppDataDirAvailable()
- {
- Debug.Assert(m_strCreateDir != null);
- if(m_strCreateDir == null) return;
-
- if(!Directory.Exists(m_strCreateDir))
- {
- try { Directory.CreateDirectory(m_strCreateDir); }
- catch(Exception) { Debug.Assert(false); }
- }
- }
-
- private static bool LoadFile(string strFile, out SortedDictionary<string, string> vConfig)
- {
- XmlDocument doc = new XmlDocument();
- XmlNode xmlField;
- string strValue;
-
- vConfig = new SortedDictionary<string, string>();
-
- try { doc.Load(strFile); }
- catch(Exception) { return false; }
-
- XmlElement el = doc.DocumentElement;
- if(el == null) return false;
- if(el.Name != RootElementName) return false;
- if(el.ChildNodes.Count <= 0) return true;
-
- foreach(XmlNode xmlChild in el.ChildNodes)
- {
- Debug.Assert(xmlChild != null); if(xmlChild == null) continue;
-
- xmlField = xmlChild.Attributes.GetNamedItem(ConfigItemName);
- if(xmlField == null) continue;
-
- strValue = xmlChild.InnerText;
- if(strValue != null) vConfig[xmlField.Value] = strValue;
- else vConfig[xmlField.Value] = string.Empty;
- }
-
- return true;
- }
-
- /// <summary>
- /// Save the current configuration to files. File cascading is
- /// handled by this function. This function first tries to write
- /// to the global configuration file, if this fails it tries the
- /// configuration file in the user's application directory.
- /// </summary>
- /// <returns>Returns <c>true</c>, if the configuration was saved
- /// successfully, <c>false</c> otherwise.</returns>
- public static bool Save()
- {
- if(m_bModified == false) return true;
-
- GetConfigPaths();
-
- if(SaveFile(m_strGlobalConfigFile)) return true;
-
- EnsureAppDataDirAvailable();
- if(SaveFile(m_strUserConfigFile)) return true;
-
- return false;
- }
-
- private static bool SaveFile(string strFile)
- {
- if(strFile == null) return false;
-
- XmlTextWriter xtw;
- try { xtw = new XmlTextWriter(strFile, Encoding.UTF8); }
- catch(Exception) { return false; }
- Debug.Assert(xtw != null); if(xtw == null) return false;
-
- xtw.WriteStartDocument();
- xtw.WriteWhitespace("\r\n");
- xtw.WriteStartElement(RootElementName);
- xtw.WriteWhitespace("\r\n");
-
- Debug.Assert(m_cfgCurrent != null);
- foreach(KeyValuePair<string, string> kvp in m_cfgCurrent)
- {
- xtw.WriteWhitespace("\t");
- xtw.WriteStartElement(ConfigItemElement);
- xtw.WriteAttributeString(ConfigItemName, kvp.Key);
-
- // xtw.WriteAttributeString(ConfigItemValue, kvp.Value);
- xtw.WriteString(kvp.Value);
-
- xtw.WriteEndElement();
- xtw.WriteWhitespace("\r\n");
- }
-
- xtw.WriteEndElement();
- xtw.WriteWhitespace("\r\n");
- xtw.WriteEndDocument();
- xtw.Close();
-
- return true;
- }
-
- /// <summary>
- /// Get the status of the global configuration file.
- /// </summary>
- /// <returns>Returns <c>true</c> if you can write to the
- /// global configuration file.</returns>
- public static bool HasWriteAccessToGlobal()
- {
- GetConfigPaths();
-
- StreamWriter sw = null;
- try { sw = File.AppendText(m_strGlobalConfigFile); }
- catch(Exception) { }
-
- if(sw != null)
- {
- sw.Close();
- return true;
- }
-
- return false;
- }
-
- /// <summary>
- /// Get a configuration string.
- /// </summary>
- /// <param name="strField">Name of the configuration item.</param>
- /// <returns>Configuration item value. Returns an empty string (<c>""</c>) if
- /// the named item could not be found.</returns>
- /// <exception cref="System.ArgumentNullException">Thrown if <paramref name="strField" />
- /// is <c>null</c>.</exception>
- public static string GetValue(string strField)
- {
- Debug.Assert(strField != null); if(strField == null) throw new ArgumentNullException();
-
- string str;
- if(m_cfgCurrent.TryGetValue(strField, out str)) return str;
-
- return string.Empty;
- }
-
- /// <summary>
- /// Get a configuration string.
- /// </summary>
- /// <param name="strField">Name of the configuration item.</param>
- /// <param name="strDefault">Default string to return if the named item
- /// doesn't exist. May be <c>null</c>.</param>
- /// <returns>Configuration item value. Returns <paramref name="strDefault" />
- /// if the configuration item doesn't exist.</returns>
- public static string GetValue(string strField, string strDefault)
- {
- Debug.Assert(strField != null); if(strField == null) throw new ArgumentNullException();
-
- string str;
- if(m_cfgCurrent.TryGetValue(strField, out str)) return str;
-
- return strDefault;
- }
-
- /// <summary>
- /// Get a configuration string.
- /// </summary>
- /// <param name="kvp">Key/value pair. Key = field name, value = default
- /// value to return if the key isn't found.</param>
- /// <returns>Configuration item value or the default value.</returns>
- public static string GetValue(KeyValuePair<string, string> kvp)
- {
- string str;
- if(m_cfgCurrent.TryGetValue(kvp.Key, out str)) return str;
-
- return kvp.Value;
- }
-
- /// <summary>
- /// Set a configuration item's value. The item is created if it doesn't
- /// exist yet. It is overwritten if it exists already.
- /// </summary>
- /// <param name="strField">Name of the configuration entry.</param>
- /// <param name="strValue">Value of the configuration entry.</param>
- /// <exception cref="System.ArgumentNullException">Thrown if one of
- /// the parameters is <c>null</c>.</exception>
- public static void SetValue(string strField, string strValue)
- {
- Debug.Assert(strField != null); // Exception will be thrown by GetValue
- Debug.Assert(strValue != null); if(strValue == null) throw new ArgumentNullException();
-
- string strExisting = GetValue(strField, null);
-
- if(strExisting == null) // Key doesn't exist yet
- {
- m_cfgCurrent[strField] = strValue;
- m_bModified = true;
- }
- else // strExisting != null, i.e. key exists already
- {
- if(!strValue.Equals(strExisting))
- {
- m_cfgCurrent[strField] = strValue;
- m_bModified = true;
- }
- }
- }
-
- public static void SetValue(KeyValuePair<string, string> kvpField, string strValue)
- {
- SetValue(kvpField.Key, strValue);
- }
-
- /// <summary>
- /// Get a boolean value from the current configuration.
- /// </summary>
- /// <param name="strField">Name of the field to get.</param>
- /// <param name="bDefaultIfNotFound">Default value that is returned
- /// if the specified field doesn't exist.</param>
- /// <returns>Returns boolean value.</returns>
- public static bool GetBool(string strField, bool bDefaultIfNotFound)
- {
- Debug.Assert(strField != null); if(strField == null) throw new ArgumentNullException();
-
- string str;
- if(m_cfgCurrent.TryGetValue(strField, out str))
- {
- if(str.Equals(ValTrue)) return true;
- if(str.Equals(ValFalse)) return false;
- }
-
- return bDefaultIfNotFound;
- }
-
- public static bool GetBool(KeyValuePair<string, string> kvp)
- {
- Debug.Assert((kvp.Value == ValTrue) || (kvp.Value == ValFalse));
-
- string str;
- if(m_cfgCurrent.TryGetValue(kvp.Key, out str))
- {
- if(str.Equals(ValTrue)) return true;
- if(str.Equals(ValFalse)) return false;
- }
-
- return (kvp.Value == ValTrue);
- }
-
- /// <summary>
- /// Set a configuration item's value.
- /// </summary>
- /// <param name="strField">Name of the item.</param>
- /// <param name="bValue">Value of the item.</param>
- public static void SetValue(string strField, bool bValue)
- {
- SetValue(strField, bValue ? ValTrue : ValFalse);
- }
-
- public static void SetValue(KeyValuePair<string, string> kvpField, bool bValue)
- {
- SetValue(kvpField.Key, bValue);
- }
-
- /// <summary>
- /// Get an integer value from the current configuration.
- /// </summary>
- /// <param name="strField">Name of the configuration item.</param>
- /// <param name="nDefaultIfNotFound">Default value that is returned if
- /// the specified item cannot be found.</param>
- /// <returns>An integer.</returns>
- /// <exception cref="System.ArgumentNullException">Thrown if <paramref name="strField" />
- /// is <c>null</c>.</exception>
- public static int GetInt(string strField, int nDefaultIfNotFound)
- {
- Debug.Assert(strField != null);
- if(strField == null) throw new ArgumentNullException("strField");
-
- string str;
- if(m_cfgCurrent.TryGetValue(strField, out str))
- {
- int nValue;
- if(StrUtil.TryParseInt(str, out nValue)) return nValue;
- }
-
- return nDefaultIfNotFound;
- }
-
- public static int GetInt(KeyValuePair<string, string> kvp)
- {
- int nValue;
- string str;
- if(m_cfgCurrent.TryGetValue(kvp.Key, out str))
- {
- if(StrUtil.TryParseInt(str, out nValue)) return nValue;
- else { Debug.Assert(false); }
- }
-
- if(StrUtil.TryParseInt(kvp.Value, out nValue)) return nValue;
- else { Debug.Assert(false); }
-
- return 0;
- }
-
- /// <summary>
- /// Get an unsigned integer value from the current configuration.
- /// </summary>
- /// <param name="strField">Name of the configuration item.</param>
- /// <param name="uDefaultIfNotFound">Default value that is returned if
- /// the specified item cannot be found.</param>
- /// <returns>An unsigned integer.</returns>
- /// <exception cref="System.ArgumentNullException">Thrown if <paramref name="strField" />
- /// is <c>null</c>.</exception>
- public static uint GetUInt(string strField, uint uDefaultIfNotFound)
- {
- Debug.Assert(strField != null);
- if(strField == null) throw new ArgumentNullException("strField");
-
- string str;
- if(m_cfgCurrent.TryGetValue(strField, out str))
- {
- uint uValue;
- if(StrUtil.TryParseUInt(str, out uValue)) return uValue;
- }
-
- return uDefaultIfNotFound;
- }
-
- public static uint GetUInt(KeyValuePair<string, string> kvp)
- {
- uint uValue;
- string str;
- if(m_cfgCurrent.TryGetValue(kvp.Key, out str))
- {
- if(StrUtil.TryParseUInt(str, out uValue)) return uValue;
- else { Debug.Assert(false); }
- }
-
- if(StrUtil.TryParseUInt(kvp.Value, out uValue)) return uValue;
- else { Debug.Assert(false); }
-
- return 0;
- }
-
- /// <summary>
- /// Get an unsigned long integer value from the current configuration.
- /// </summary>
- /// <param name="strField">Name of the configuration item.</param>
- /// <param name="uDefaultIfNotFound">Default value that is returned if
- /// the specified item cannot be found.</param>
- /// <returns>An unsigned long integer.</returns>
- /// <exception cref="System.ArgumentNullException">Thrown if <paramref name="strField" />
- /// is <c>null</c>.</exception>
- public static ulong GetULong(string strField, ulong uDefaultIfNotFound)
- {
- Debug.Assert(strField != null);
- if(strField == null) throw new ArgumentNullException("strField");
-
- string str;
- if(m_cfgCurrent.TryGetValue(strField, out str))
- {
- ulong uValue;
- if(StrUtil.TryParseULong(str, out uValue)) return uValue;
- }
-
- return uDefaultIfNotFound;
- }
-
- public static ulong GetULong(KeyValuePair<string, string> kvp)
- {
- ulong uValue;
- string str;
- if(m_cfgCurrent.TryGetValue(kvp.Key, out str))
- {
- if(StrUtil.TryParseULong(str, out uValue)) return uValue;
- else { Debug.Assert(false); }
- }
-
- if(StrUtil.TryParseULong(kvp.Value, out uValue)) return uValue;
- else { Debug.Assert(false); }
-
- return 0;
- }
-
- /// <summary>
- /// Set a configuration item's value.
- /// </summary>
- /// <param name="strField">Name of the configuration item.</param>
- /// <param name="nValue">Value of the configuration item.</param>
- public static void SetValue(string strField, int nValue)
- {
- SetValue(strField, nValue.ToString());
- }
-
- public static void SetValue(KeyValuePair<string, string> kvpField, int nValue)
- {
- SetValue(kvpField.Key, nValue.ToString());
- }
-
- /// <summary>
- /// Set a configuration item's value.
- /// </summary>
- /// <param name="strField">Name of the configuration item.</param>
- /// <param name="uValue">Value of the configuration item.</param>
- public static void SetValue(string strField, uint uValue)
- {
- SetValue(strField, uValue.ToString());
- }
-
- public static void SetValue(KeyValuePair<string, string> kvpField, uint uValue)
- {
- SetValue(kvpField.Key, uValue.ToString());
- }
-
- /// <summary>
- /// Set a configuration item's value.
- /// </summary>
- /// <param name="strField">Name of the configuration item.</param>
- /// <param name="uValue">Value of the configuration item.</param>
- public static void SetValue(string strField, ulong uValue)
- {
- SetValue(strField, uValue.ToString());
- }
-
- public static void SetValue(KeyValuePair<string, string> kvpField, ulong uValue)
- {
- SetValue(kvpField.Key, uValue.ToString());
- }
-
- /// <summary>
- /// Remove all fields indexed by a prefix and consecutive numbers.
- /// All fields starting with the prefix will be removed. Index
- /// is zero-based.
- /// </summary>
- /// <param name="strFieldPrefix">Field prefix.</param>
- /// <param name="uStartIndex">First index.</param>
- public static void RemoveIndexedItems(string strFieldPrefix, uint uStartIndex)
- {
- uint uPos = uStartIndex;
- string strField;
-
- while(true)
- {
- strField = strFieldPrefix + uPos.ToString();
-
- if(GetValue(strField, null) != null)
- {
- m_cfgCurrent.Remove(strField);
- Debug.Assert(GetValue(strField, null) == null);
-
- ++uPos;
- }
- else break;
- }
- }
- }
-}
-
-#endif // KeePassLibSD
diff --git a/Ext/DeprecatedSources/AppPolicy.txt b/Ext/DeprecatedSources/AppPolicy.txt
deleted file mode 100644
index db4c3cc..0000000
--- a/Ext/DeprecatedSources/AppPolicy.txt
+++ /dev/null
@@ -1,147 +0,0 @@
- /// <summary>
- /// Application policy settings
- /// </summary>
- public static class AppPolicy
- {
- private static bool[] m_vCurPolicyFlags = new bool[(int)AppPolicyFlag.Count];
- private static bool[] m_vNewPolicyFlags = new bool[(int)AppPolicyFlag.Count];
-
- private static string PolicyToString(AppPolicyFlag flag)
- {
- string str = KPRes.Feature + @": ";
-
- switch(flag)
- {
- case AppPolicyFlag.Plugins:
- str += KPRes.Plugins;
- break;
- case AppPolicyFlag.Export:
- str += KPRes.Export;
- break;
- case AppPolicyFlag.Import:
- str += KPRes.Import;
- break;
- case AppPolicyFlag.Print:
- str += KPRes.Print;
- break;
- case AppPolicyFlag.SaveDatabase:
- str += KPRes.SaveDatabase;
- break;
- case AppPolicyFlag.AutoType:
- str += KPRes.AutoType;
- break;
- case AppPolicyFlag.CopyToClipboard:
- str += KPRes.Clipboard;
- break;
- case AppPolicyFlag.DragDrop:
- str += KPRes.DragDrop;
- break;
- case AppPolicyFlag.ChangeMasterKey:
- str += KPRes.ChangeMasterKey;
- break;
- case AppPolicyFlag.EditTriggers:
- str += KPRes.TriggersEdit;
- break;
- case AppPolicyFlag.UnhidePasswords:
- str += KPRes.UnhidePasswords;
- break;
- default:
- Debug.Assert(false);
- str += KPRes.Unknown + ".";
- break;
- }
-
- str += MessageService.NewLine + KPRes.Description + @": ";
-
- switch(flag)
- {
- case AppPolicyFlag.Plugins:
- str += KPRes.PolicyPluginsDesc;
- break;
- case AppPolicyFlag.Export:
- str += KPRes.PolicyExportDesc;
- break;
- case AppPolicyFlag.Import:
- str += KPRes.PolicyImportDesc;
- break;
- case AppPolicyFlag.Print:
- str += KPRes.PolicyPrintDesc;
- break;
- case AppPolicyFlag.SaveDatabase:
- str += KPRes.PolicySaveDatabaseDesc;
- break;
- case AppPolicyFlag.AutoType:
- str += KPRes.PolicyAutoTypeDesc;
- break;
- case AppPolicyFlag.CopyToClipboard:
- str += KPRes.PolicyClipboardDesc;
- break;
- case AppPolicyFlag.DragDrop:
- str += KPRes.PolicyDragDropDesc;
- break;
- case AppPolicyFlag.ChangeMasterKey:
- str += KPRes.PolicyChangeMasterKey;
- break;
- case AppPolicyFlag.EditTriggers:
- str += KPRes.PolicyTriggersEditDesc;
- break;
- case AppPolicyFlag.UnhidePasswords:
- str += KPRes.UnhidePasswordsDesc;
- break;
- default:
- Debug.Assert(false);
- str += KPRes.Unknown + ".";
- break;
- }
-
- return str;
- }
-
- public static string RequiredPolicyMessage(AppPolicyFlag flag)
- {
- string str = KPRes.PolicyDisallowed + MessageService.NewParagraph;
- str += KPRes.PolicyRequiredFlag + ":" + MessageService.NewLine;
- str += PolicyToString(flag);
-
- return str;
- }
-
- public static void CurrentAllowAll(bool bAllow)
- {
- for(int i = 0; i < (int)AppPolicyFlag.Count; ++i)
- m_vCurPolicyFlags[i] = m_vNewPolicyFlags[i] = bAllow;
- }
-
- public static void CurrentAllow(AppPolicyFlag flag, bool bAllow)
- {
- m_vCurPolicyFlags[(int)flag] = m_vNewPolicyFlags[(int)flag] = bAllow;
- }
-
- public static void NewAllow(AppPolicyFlag flag, bool bAllow)
- {
- m_vNewPolicyFlags[(int)flag] = bAllow;
- }
-
- public static bool NewIsAllowed(AppPolicyFlag flag)
- {
- return m_vNewPolicyFlags[(int)flag];
- }
-
- public static bool IsAllowed(AppPolicyFlag flag)
- {
- return m_vCurPolicyFlags[(int)flag];
- }
-
- public static bool Try(AppPolicyFlag flag)
- {
- bool bAllowed = m_vCurPolicyFlags[(int)flag];
-
- if(bAllowed == false)
- {
- string strMsg = RequiredPolicyMessage(flag);
- MessageService.ShowWarning(strMsg);
- }
-
- return bAllowed;
- }
- }
diff --git a/Ext/DeprecatedSources/EntryTemplates.cs b/Ext/DeprecatedSources/EntryTemplates.cs
deleted file mode 100644
index 1a2dc3a..0000000
--- a/Ext/DeprecatedSources/EntryTemplates.cs
+++ /dev/null
@@ -1,226 +0,0 @@
-/*
- KeePass Password Safe - The Open-Source Password Manager
- Copyright (C) 2003-2009 Dominik Reichl <dominik.reichl at t-online.de>
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-*/
-
-using System;
-using System.Collections.Generic;
-using System.Text;
-using System.Drawing;
-using System.Windows.Forms;
-using System.Diagnostics;
-
-using KeePass.Forms;
-using KeePass.Resources;
-
-using KeePassLib;
-using KeePassLib.Security;
-
-namespace KeePass.Util
-{
- internal sealed class EntryTemplateItem
- {
- private bool m_bProtected = false;
- private string m_strItemName = string.Empty;
-
- public bool Protected
- {
- get { return m_bProtected; }
- }
-
- public string Name
- {
- get { return m_strItemName; }
- }
-
- public EntryTemplateItem(string strItemName, bool bProtected)
- {
- if(strItemName == null) throw new ArgumentNullException("strItemName");
- m_strItemName = strItemName;
- m_bProtected = bProtected;
- }
- }
-
- internal sealed class EntryTemplate
- {
- private string m_strName = string.Empty;
- private Image m_imgSmallIcon = null;
- private EntryTemplateItem[] m_pItems = null;
-
- public string Name
- {
- get { return m_strName; }
- }
-
- public Image SmallIcon
- {
- get { return m_imgSmallIcon; }
- }
-
- public EntryTemplateItem[] Items
- {
- get { return m_pItems; }
- }
-
- public EntryTemplate(string strName, Image imgSmallIcon, EntryTemplateItem[] pEntries)
- {
- if(strName == null) throw new ArgumentNullException("strName");
- if(pEntries == null) throw new ArgumentNullException("pEntries");
-
- m_strName = strName;
- m_imgSmallIcon = imgSmallIcon;
- m_pItems = pEntries;
- }
- }
-
- public static class EntryTemplates
- {
- private static List<EntryTemplate> m_vTemplates = new List<EntryTemplate>();
-
- private static ToolStripSplitButton m_btnItemsHost = null;
- private static List<ToolStripItem> m_vToolStripItems = new List<ToolStripItem>();
-
- public static void Init(ToolStripSplitButton btnHost)
- {
- if(btnHost == null) throw new ArgumentNullException("btnHost");
- m_btnItemsHost = btnHost;
-
- ToolStripSeparator tsSep = new ToolStripSeparator();
- m_btnItemsHost.DropDownItems.Add(tsSep);
- m_vToolStripItems.Add(tsSep);
-
- EntryTemplates.AddItem(BankAccount);
- EntryTemplates.AddItem(PersonalContact);
- }
-
- private static void AddItem(EntryTemplate et)
- {
- m_vTemplates.Add(et);
-
- ToolStripMenuItem tsmi = new ToolStripMenuItem(et.Name);
- tsmi.Click += OnEntryTemplatesExecute;
- m_btnItemsHost.DropDownItems.Add(tsmi);
-
- if(et.SmallIcon != null) tsmi.Image = et.SmallIcon;
- else tsmi.Image = KeePass.Properties.Resources.B16x16_KGPG_Key1;
-
- m_vToolStripItems.Add(tsmi);
- }
-
- public static void Clear()
- {
- m_vTemplates.Clear();
-
- foreach(ToolStripItem tsmi in m_vToolStripItems)
- {
- tsmi.Click -= OnEntryTemplatesExecute;
- m_btnItemsHost.DropDownItems.Remove(tsmi);
- }
-
- m_vToolStripItems.Clear();
- }
-
- private static void OnEntryTemplatesExecute(object sender, EventArgs e)
- {
- ToolStripMenuItem tsmi = sender as ToolStripMenuItem;
- if(tsmi == null) { Debug.Assert(false); return; }
-
- string strName = tsmi.Text;
- foreach(EntryTemplate et in m_vTemplates)
- {
- if(et.Name == strName)
- {
- CreateEntry(et);
- break;
- }
- }
- }
-
- private static void CreateEntry(EntryTemplate et)
- {
- if(Program.MainForm.ActiveDatabase.IsOpen == false)
- {
- Debug.Assert(false);
- return;
- }
-
- PwGroup pgContainer = Program.MainForm.GetSelectedGroup();
- if(pgContainer == null)
- pgContainer = Program.MainForm.ActiveDatabase.RootGroup;
-
- PwEntry pe = new PwEntry(true, true);
-
- // pe.Strings.Set(PwDefs.TitleField, new ProtectedString(
- // Program.MainForm.Database.MemoryProtection.ProtectTitle,
- // et.Name));
-
- foreach(EntryTemplateItem eti in et.Items)
- pe.Strings.Set(eti.Name, new ProtectedString(eti.Protected, string.Empty));
-
- PwEntryForm pef = new PwEntryForm();
- pef.InitEx(pe, PwEditMode.AddNewEntry, Program.MainForm.ActiveDatabase,
- Program.MainForm.ClientIcons, true);
-
- if(pef.ShowDialog() == DialogResult.OK)
- {
- pgContainer.AddEntry(pe, true);
-
- // Program.MainForm.UpdateEntryList(null, true);
- // Program.MainForm.UpdateUIState(true);
- Program.MainForm.UpdateUI(false, null, false, null, true, null, true);
- }
- else Program.MainForm.UpdateUI(false, null, false, null, false, null, false);
- }
-
- private static readonly EntryTemplate BankAccount = new EntryTemplate(
- KPRes.BankAccount, null, new EntryTemplateItem[]{
- new EntryTemplateItem(KPRes.TAccountNumber, false),
- new EntryTemplateItem(KPRes.TAccountType, false),
- new EntryTemplateItem(KPRes.BranchCode, false),
- new EntryTemplateItem(KPRes.RoutingCode, false),
- new EntryTemplateItem(KPRes.SortCode, false),
- new EntryTemplateItem(KPRes.Iban, false),
- new EntryTemplateItem(KPRes.SwiftCode, false),
- new EntryTemplateItem(KPRes.BranchTel, false),
- new EntryTemplateItem(KPRes.TAccountInfoTel, false),
- new EntryTemplateItem(KPRes.BranchHours, false),
- new EntryTemplateItem(KPRes.TAccountNames, false),
- new EntryTemplateItem(KPRes.MinBalance, false),
- new EntryTemplateItem(KPRes.TransfersOf, false),
- new EntryTemplateItem(KPRes.Frequency, false)
- });
-
- private static readonly EntryTemplate PersonalContact = new EntryTemplate(
- KPRes.Contact, null, new EntryTemplateItem[]{
- new EntryTemplateItem(KPRes.JobTitle, false),
- new EntryTemplateItem(KPRes.Department, false),
- new EntryTemplateItem(KPRes.Company, false),
- new EntryTemplateItem(KPRes.WorkTel, false),
- new EntryTemplateItem(KPRes.EMail, false),
- new EntryTemplateItem(KPRes.HomeTel, false),
- new EntryTemplateItem(KPRes.MobileTel, false),
- new EntryTemplateItem(KPRes.Pager, false),
- new EntryTemplateItem(KPRes.CarTel, false),
- new EntryTemplateItem(KPRes.WorkFax, false),
- new EntryTemplateItem(KPRes.HomeFax, false),
- new EntryTemplateItem(KPRes.WebPage, false),
- new EntryTemplateItem(KPRes.Assistant, false),
- new EntryTemplateItem(KPRes.AssistantTel, false),
- new EntryTemplateItem(KPRes.HomeAddress, false)
- });
- }
-}
diff --git a/Ext/DeprecatedSources/EntryTemplates_DefaultText.xml b/Ext/DeprecatedSources/EntryTemplates_DefaultText.xml
deleted file mode 100644
index 611a0c6..0000000
--- a/Ext/DeprecatedSources/EntryTemplates_DefaultText.xml
+++ /dev/null
@@ -1,1499 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<Translation>
- <StringTable Name="KPRes" Namespace="KeePass.Resources">
- <Data Name="Action">
- <Value>Action</Value>
- </Data>
- <Data Name="AddCustomToolBarButton">
- <Value>Add custom toolbar button</Value>
- </Data>
- <Data Name="AddEntry">
- <Value>Add Entry</Value>
- </Data>
- <Data Name="AddEntryBtn">
- <Value>Add Entry...</Value>
- </Data>
- <Data Name="AddEntryDesc">
- <Value>Create a new password entry.</Value>
- </Data>
- <Data Name="AddStringField">
- <Value>Add Entry String Field</Value>
- </Data>
- <Data Name="AddStringFieldDesc">
- <Value>Create a new string field for the current entry.</Value>
- </Data>
- <Data Name="Advanced">
- <Value>Advanced</Value>
- </Data>
- <Data Name="AfterDatabaseOpen">
- <Value>After Opening a Database</Value>
- </Data>
- <Data Name="AllEntriesTitle">
- <Value>All Entries</Value>
- </Data>
- <Data Name="AllFiles">
- <Value>All Files</Value>
- </Data>
- <Data Name="AllSupportedFiles">
- <Value>All Supported Files</Value>
- </Data>
- <Data Name="Application">
- <Value>Application</Value>
- </Data>
- <Data Name="ApplicationExit">
- <Value>Application exit</Value>
- </Data>
- <Data Name="ApplicationStartup">
- <Value>Application startup</Value>
- </Data>
- <Data Name="Arguments">
- <Value>Arguments</Value>
- </Data>
- <Data Name="AskContinue">
- <Value>Do you want to continue?</Value>
- </Data>
- <Data Name="Assistant">
- <Value>Assistant</Value>
- </Data>
- <Data Name="AssistantTel">
- <Value>AssistantTel</Value>
- </Data>
- <Data Name="AttachedExistsAlready">
- <Value>The following file has already been attached to the current entry:</Value>
- </Data>
- <Data Name="AttachFailed">
- <Value>Failed to attach file:</Value>
- </Data>
- <Data Name="AttachFiles">
- <Value>Attach Files To Entry</Value>
- </Data>
- <Data Name="Attachments">
- <Value>Attachments</Value>
- </Data>
- <Data Name="AttachmentSave">
- <Value>Save Attached File As</Value>
- </Data>
- <Data Name="AttachmentsSave">
- <Value>Save attached files to:</Value>
- </Data>
- <Data Name="AttachNewRename">
- <Value>Do you wish to rename the new file or overwrite the existing attached file?</Value>
- </Data>
- <Data Name="AttachNewRenameRemarks0">
- <Value>Click [Yes] to rename the new file.</Value>
- </Data>
- <Data Name="AttachNewRenameRemarks1">
- <Value>Click [No] to overwrite the existing attached file.</Value>
- </Data>
- <Data Name="AttachNewRenameRemarks2">
- <Value>Click [Cancel] to skip this file.</Value>
- </Data>
- <Data Name="Author">
- <Value>Author</Value>
- </Data>
- <Data Name="AutoCreateNew">
- <Value>Automatically create new</Value>
- </Data>
- <Data Name="AutoGeneratedPasswordSettings">
- <Value>Automatically generated passwords for new entries</Value>
- </Data>
- <Data Name="AutoRememberOpenLastFile">
- <Value>Remember and automatically open last used database on startup</Value>
- </Data>
- <Data Name="AutoSaveAtExit">
- <Value>Automatically save when closing/locking the database</Value>
- </Data>
- <Data Name="AutoShowExpiredEntries">
- <Value>Show expired entries (if any)</Value>
- </Data>
- <Data Name="AutoShowSoonToExpireEntries">
- <Value>Show entries that will expire soon (if any)</Value>
- </Data>
- <Data Name="AutoType">
- <Value>Auto-Type</Value>
- </Data>
- <Data Name="AutoTypeEntrySelection">
- <Value>Auto-Type Entry Selection</Value>
- </Data>
- <Data Name="AutoTypeEntrySelectionDescLong">
- <Value>Multiple entries have been found for the currently active window. Please select the entry, which you want to auto-type into the active window.</Value>
- </Data>
- <Data Name="AutoTypeEntrySelectionDescShort">
- <Value>Multiple entries exist for the current window.</Value>
- </Data>
- <Data Name="AutoTypeObfuscationHint">
- <Value>Auto-type obfuscation may not work with all windows.</Value>
- </Data>
- <Data Name="AutoTypePrependInitSeqForIE">
- <Value>Prepend special initialization sequence for Internet Explorer windows</Value>
- </Data>
- <Data Name="AutoTypeSequenceInvalid">
- <Value>The specified auto-type sequence is invalid.</Value>
- </Data>
- <Data Name="AutoTypeUnknownPlaceholder">
- <Value>The following auto-type placeholder or special key code is unknown/unsupported:</Value>
- </Data>
- <Data Name="AvailableLanguages">
- <Value>Available Languages</Value>
- </Data>
- <Data Name="BankAccount">
- <Value>Bank Account</Value>
- </Data>
- <Data Name="Bits">
- <Value>Bits</Value>
- </Data>
- <Data Name="BranchCode">
- <Value>Branch Code</Value>
- </Data>
- <Data Name="BranchHours">
- <Value>Branch Hours</Value>
- </Data>
- <Data Name="BranchTel">
- <Value>Branch Tel.</Value>
- </Data>
- <Data Name="Browser">
- <Value>Browser</Value>
- </Data>
- <Data Name="ButtonBack">
- <Value>< &Back</Value>
- </Data>
- <Data Name="ButtonFinish">
- <Value>&Finish</Value>
- </Data>
- <Data Name="ButtonNext">
- <Value>&Next ></Value>
- </Data>
- <Data Name="Cancel">
- <Value>Cancel</Value>
- </Data>
- <Data Name="CannotMoveEntriesBcsGroup">
- <Value>Cannot move entries because they aren't stored in the same group.</Value>
- </Data>
- <Data Name="CarTel">
- <Value>Car Tel.</Value>
- </Data>
- <Data Name="ChangeMasterKeyIntroShort">
- <Value>You are changing the composite master key for the currently-open database.</Value>
- </Data>
- <Data Name="CheckForUpdAtStart">
- <Value>Check for update at KeePass startup</Value>
- </Data>
- <Data Name="ChkForUpdGotLatest">
- <Value>You have the latest version.</Value>
- </Data>
- <Data Name="ChkForUpdNewVersion">
- <Value>New KeePass version available!</Value>
- </Data>
- <Data Name="ClearMru">
- <Value>&Clear List</Value>
- </Data>
- <Data Name="Clipboard">
- <Value>Clipboard</Value>
- </Data>
- <Data Name="ClipboardClearInSeconds">
- <Value>Clipboard will be cleared in [PARAM] seconds</Value>
- </Data>
- <Data Name="ClipboardClearOnExit">
- <Value>Clear clipboard when closing KeePass</Value>
- </Data>
- <Data Name="ClipboardDataCopied">
- <Value>Data copied to clipboard.</Value>
- </Data>
- <Data Name="ClipboardViewerIgnoreFormat">
- <Value>Protect clipboard using 'Clipboard Viewer Ignore' format</Value>
- </Data>
- <Data Name="CloseButton">
- <Value>&Close</Value>
- </Data>
- <Data Name="CloseButtonMinimizes">
- <Value>Close button [X] minimizes main window instead of terminating the application</Value>
- </Data>
- <Data Name="Company">
- <Value>Company</Value>
- </Data>
- <Data Name="Comparison">
- <Value>Comparison</Value>
- </Data>
- <Data Name="Components">
- <Value>Components</Value>
- </Data>
- <Data Name="Condition">
- <Value>Condition</Value>
- </Data>
- <Data Name="ConfigAffectAdmin">
- <Value>Changes to the configuration/policy will affect you and all users of this KeePass installation.</Value>
- </Data>
- <Data Name="ConfigAffectUser">
- <Value>Changes to the configuration/policy will only affect you. Policy flags that are enforced by the administrator are reset after restarting KeePass.</Value>
- </Data>
- <Data Name="ConfigSaveFailed">
- <Value>Failed to save the configuration.</Value>
- </Data>
- <Data Name="ConfigureAutoType">
- <Value>Configure Auto-Type</Value>
- </Data>
- <Data Name="ConfigureAutoTypeDesc">
- <Value>Configure auto-type behaviour for this entry.</Value>
- </Data>
- <Data Name="ConfigureAutoTypeItem">
- <Value>Configure Auto-Type Item</Value>
- </Data>
- <Data Name="ConfigureAutoTypeItemDesc">
- <Value>Associate a window title with a keystroke sequence.</Value>
- </Data>
- <Data Name="ConfigureKeystrokeSeq">
- <Value>Configure Keystroke Sequence</Value>
- </Data>
- <Data Name="ConfigureKeystrokeSeqDesc">
- <Value>Define a default keystroke sequence.</Value>
- </Data>
- <Data Name="ConfigureOnNewDatabase">
- <Value>Create New Password Database - Step 2</Value>
- </Data>
- <Data Name="Contact">
- <Value>Contact</Value>
- </Data>
- <Data Name="ContainsOp">
- <Value>Contains</Value>
- </Data>
- <Data Name="CopiedEntryData">
- <Value>Copied entry data to clipboard</Value>
- </Data>
- <Data Name="Copy">
- <Value>Copy</Value>
- </Data>
- <Data Name="CopyAll">
- <Value>Copy All</Value>
- </Data>
- <Data Name="CopyOfItem">
- <Value>Copy</Value>
- </Data>
- <Data Name="CopyPasswordFull">
- <Value>Copy Password to Clipboard</Value>
- </Data>
- <Data Name="CopyPasswordMenu">
- <Value>Copy &Password</Value>
- </Data>
- <Data Name="CopyTanMenu">
- <Value>Copy &TAN</Value>
- </Data>
- <Data Name="CopyUserFull">
- <Value>Copy User Name to Clipboard</Value>
- </Data>
- <Data Name="CreateMasterKey">
- <Value>Create Composite Master Key</Value>
- </Data>
- <Data Name="CreateNewDatabase">
- <Value>Create New Password Database</Value>
- </Data>
- <Data Name="CreationTime">
- <Value>Creation Time</Value>
- </Data>
- <Data Name="CredSaveAll">
- <Value>Remember user name and password</Value>
- </Data>
- <Data Name="CredSaveNone">
- <Value>Do not remember user name and password</Value>
- </Data>
- <Data Name="CredSaveUserOnly">
- <Value>Remember user name only</Value>
- </Data>
- <Data Name="CsvTextFile">
- <Value>CSV / Text File</Value>
- </Data>
- <Data Name="CurrentStyle">
- <Value>Current Style</Value>
- </Data>
- <Data Name="Custom">
- <Value>Custom</Value>
- </Data>
- <Data Name="CustomFields">
- <Value>Custom Fields</Value>
- </Data>
- <Data Name="CustomizableHtml">
- <Value>Customizable HTML File</Value>
- </Data>
- <Data Name="CustomTbButtonClicked">
- <Value>Custom toolbar button clicked</Value>
- </Data>
- <Data Name="Cut">
- <Value>Cut</Value>
- </Data>
- <Data Name="Data">
- <Value>Data</Value>
- </Data>
- <Data Name="Database">
- <Value>Database</Value>
- </Data>
- <Data Name="DatabaseDescPrompt">
- <Value>Enter a short description of the database or leave it empty.</Value>
- </Data>
- <Data Name="DatabaseMaintenance">
- <Value>Database Maintenance</Value>
- </Data>
- <Data Name="DatabaseMaintenanceDesc">
- <Value>Here you can maintain the currently opened database.</Value>
- </Data>
- <Data Name="DatabaseModifiedNoDot">
- <Value>The current database file has been modified</Value>
- </Data>
- <Data Name="DatabaseNamePrompt">
- <Value>Enter a name for the database or leave it empty.</Value>
- </Data>
- <Data Name="DatabaseSettings">
- <Value>Database Settings</Value>
- </Data>
- <Data Name="DatabaseSettingsDesc">
- <Value>Here you can configure various database settings.</Value>
- </Data>
- <Data Name="Default">
- <Value>Default</Value>
- </Data>
- <Data Name="Delete">
- <Value>Delete</Value>
- </Data>
- <Data Name="DeleteEntriesTitle">
- <Value>Delete Entries</Value>
- </Data>
- <Data Name="DeleteEntriesTitleSingle">
- <Value>Delete Entry</Value>
- </Data>
- <Data Name="DeleteEntriesQuestion">
- <Value>Are you sure you want to permanently delete the selected entries?</Value>
- </Data>
- <Data Name="DeleteEntriesQuestionSingle">
- <Value>Are you sure you want to permanently delete the selected entry?</Value>
- </Data>
- <Data Name="DeleteGroupTitle">
- <Value>Delete Group</Value>
- </Data>
- <Data Name="DeleteGroupInfo">
- <Value>Deleting a group will also delete all entries and subgroups in that group.</Value>
- </Data>
- <Data Name="DeleteGroupQuestion">
- <Value>Are you sure you want to permanently delete the selected group?</Value>
- </Data>
- <Data Name="Department">
- <Value>Department</Value>
- </Data>
- <Data Name="Description">
- <Value>Description</Value>
- </Data>
- <Data Name="Details">
- <Value>Details</Value>
- </Data>
- <Data Name="DiscardChanges">
- <Value>Discard changes</Value>
- </Data>
- <Data Name="DocumentationHint">
- <Value>Please see the documentation for more details.</Value>
- </Data>
- <Data Name="DragDrop">
- <Value>Drag&Drop</Value>
- </Data>
- <Data Name="DuplicateStringFieldName">
- <Value>The string field name you specified already exists. String field names must be unique for each entry.</Value>
- </Data>
- <Data Name="EditEntry">
- <Value>Edit Entry</Value>
- </Data>
- <Data Name="EditEntryDesc">
- <Value>You're editing an existing password entry.</Value>
- </Data>
- <Data Name="EditGroup">
- <Value>Edit Group</Value>
- </Data>
- <Data Name="EditGroupDesc">
- <Value>Edit properties of the currently selected group.</Value>
- </Data>
- <Data Name="EditStringField">
- <Value>Edit Entry String Field</Value>
- </Data>
- <Data Name="EditStringFieldDesc">
- <Value>Edit one of the entry's string fields.</Value>
- </Data>
- <Data Name="EMail">
- <Value>eMail</Value>
- </Data>
- <Data Name="Empty">
- <Value>Empty</Value>
- </Data>
- <Data Name="Encoding">
- <Value>Encoding</Value>
- </Data>
- <Data Name="EncodingAnsi">
- <Value>Default ANSI (System)</Value>
- </Data>
- <Data Name="EncodingFail">
- <Value>Selected encoding is invalid. The file cannot be interpreted using the selected encoding.</Value>
- </Data>
- <Data Name="EndsWith">
- <Value>Ends with</Value>
- </Data>
- <Data Name="EnterCompositeKey">
- <Value>Enter Master Key</Value>
- </Data>
- <Data Name="EntropyDesc">
- <Value>Generate additional random bits.</Value>
- </Data>
- <Data Name="EntropyTitle">
- <Value>Entropy Collection</Value>
- </Data>
- <Data Name="Entry">
- <Value>Entry</Value>
- </Data>
- <Data Name="EntryList">
- <Value>Entry List</Value>
- </Data>
- <Data Name="EnvironmentVariable">
- <Value>Environment variable</Value>
- </Data>
- <Data Name="EqualsOp">
- <Value>Equals</Value>
- </Data>
- <Data Name="ErrorCode">
- <Value>Error Code</Value>
- </Data>
- <Data Name="Errors">
- <Value>Errors</Value>
- </Data>
- <Data Name="Event">
- <Value>Event</Value>
- </Data>
- <Data Name="ExecuteCmdLineUrl">
- <Value>Execute command line / URL</Value>
- </Data>
- <Data Name="ExitInsteadOfLockingAfterTime">
- <Value>Exit instead of locking the workspace after the specified time</Value>
- </Data>
- <Data Name="ExpiredEntries">
- <Value>Expired Entries</Value>
- </Data>
- <Data Name="ExpiryTime">
- <Value>Expiry Time</Value>
- </Data>
- <Data Name="Export">
- <Value>Export</Value>
- </Data>
- <Data Name="ExportFileDesc">
- <Value>Export data to an external file.</Value>
- </Data>
- <Data Name="ExportFileTitle">
- <Value>Export File/Data</Value>
- </Data>
- <Data Name="ExportHtml">
- <Value>Export To HTML</Value>
- </Data>
- <Data Name="ExportHtmlDesc">
- <Value>Export entries to a HTML file.</Value>
- </Data>
- <Data Name="ExportingStatusMsg">
- <Value>Exporting...</Value>
- </Data>
- <Data Name="ExportToPrompt">
- <Value>Export to:</Value>
- </Data>
- <Data Name="FatalError">
- <Value>Fatal Error</Value>
- </Data>
- <Data Name="Feature">
- <Value>Feature</Value>
- </Data>
- <Data Name="FieldName">
- <Value>Field Name</Value>
- </Data>
- <Data Name="FieldNameExistsAlready">
- <Value>The entered name exists already and cannot be used.</Value>
- </Data>
- <Data Name="FieldNameInvalid">
- <Value>The entered name is invalid and cannot be used.</Value>
- </Data>
- <Data Name="FieldNamePrompt">
- <Value>Please enter a field name.</Value>
- </Data>
- <Data Name="FieldRefInvalidChars">
- <Value>The selected field, which identifies the source entry, contains illegal characters (like '{', '}', newline characters, ...).</Value>
- </Data>
- <Data Name="FieldRefMultiMatch">
- <Value>Multiple entries match the specified identifying field.</Value>
- </Data>
- <Data Name="FieldRefMultiMatchHint">
- <Value>To avoid ambiguity, entries can be identified by their UUIDs, which are unique.</Value>
- </Data>
- <Data Name="FieldValue">
- <Value>Field Value</Value>
- </Data>
- <Data Name="File">
- <Value>File</Value>
- </Data>
- <Data Name="FileChanged">
- <Value>The file on disk/server has changed since it was loaded. Probably someone else has edited and saved the database.</Value>
- </Data>
- <Data Name="FileChangedOverwrite">
- <Value>Save the current database to the file. Changes made by the other user will be lost.</Value>
- </Data>
- <Data Name="FileChangedSync">
- <Value>Load the file on disk/server and merge it with the current database in memory.</Value>
- </Data>
- <Data Name="FileExists">
- <Value>File exists</Value>
- </Data>
- <Data Name="FileExistsAlready">
- <Value>The following file exists already:</Value>
- </Data>
- <Data Name="FileExtInstallFailed">
- <Value>Failed to create the file association. Make sure you have write access to the file associations list.</Value>
- </Data>
- <Data Name="FileExtInstallSuccess">
- <Value>Successfully associated KDBX files with KeePass! KDBX files will now be opened by KeePass when you double-click on them.</Value>
- </Data>
- <Data Name="FileExtName">
- <Value>KeePass Password Database</Value>
- </Data>
- <Data Name="FileLockedBy">
- <Value>The specified file is currently locked by the following user:</Value>
- </Data>
- <Data Name="FileLockedWarning">
- <Value>KeePass will open the file, but note that you might overwrite changes each other when saving.</Value>
- </Data>
- <Data Name="FileNameContainsSemicolonError">
- <Value>This file path contains a semicolon (;) and therefore cannot be processed. Replace the semicolon and repeat the procedure.</Value>
- </Data>
- <Data Name="FileNotFoundError">
- <Value>The specified file could not be found.</Value>
- </Data>
- <Data Name="FileOrUrl">
- <Value>File/URL</Value>
- </Data>
- <Data Name="Files">
- <Value>Files</Value>
- </Data>
- <Data Name="FileSaveQClosing">
- <Value>Save database changes before closing the file?</Value>
- </Data>
- <Data Name="FileSaveQExiting">
- <Value>Save database changes before exiting KeePass?</Value>
- </Data>
- <Data Name="FileSaveQLocking">
- <Value>Save database changes before locking the workspace?</Value>
- </Data>
- <Data Name="FileSaveQOpCancel">
- <Value>Abort the current operation.</Value>
- </Data>
- <Data Name="FileSaveQOpCancelClosing">
- <Value>The file will not be closed.</Value>
- </Data>
- <Data Name="FileSaveQOpCancelExiting">
- <Value>KeePass will not be closed.</Value>
- </Data>
- <Data Name="FileSaveQOpCancelLocking">
- <Value>The KeePass workspace will not be locked.</Value>
- </Data>
- <Data Name="FileSaveQOpNoClosing">
- <Value>Discard all changes made to the database and close the file.</Value>
- </Data>
- <Data Name="FileSaveQOpNoExiting">
- <Value>Discard all changes made to the database and exit KeePass.</Value>
- </Data>
- <Data Name="FileSaveQOpNoLocking">
- <Value>Discard all changes made to the database and lock the KeePass workspace.</Value>
- </Data>
- <Data Name="FileSaveQOpYesClosing">
- <Value>Save all changes made to the database and close the file.</Value>
- </Data>
- <Data Name="FileSaveQOpYesExiting">
- <Value>Save all changes made to the database and exit KeePass.</Value>
- </Data>
- <Data Name="FileSaveQOpYesLocking">
- <Value>Save all changes made to the database and lock the KeePass workspace.</Value>
- </Data>
- <Data Name="FileVerifyHashFail">
- <Value>The new file's content does not match the data that KeePass has written, i.e. writing to the file has failed and it might be corrupted now.</Value>
- </Data>
- <Data Name="FileVerifyHashFailRec">
- <Value>Please try saving again, and if that fails, save the database to a different location.</Value>
- </Data>
- <Data Name="Filter">
- <Value>Filter</Value>
- </Data>
- <Data Name="FocusResultsAfterQuickFind">
- <Value>Focus entry list after a successful quick search (toolbar)</Value>
- </Data>
- <Data Name="FormatNoDatabaseDesc">
- <Value>This file format doesn't support database descriptions.</Value>
- </Data>
- <Data Name="FormatNoDatabaseName">
- <Value>This file format doesn't support database names.</Value>
- </Data>
- <Data Name="FormatNoRootEntries">
- <Value>This file format doesn't support root groups. All entries in the root group are moved to the first subgroup.</Value>
- </Data>
- <Data Name="FormatNoSubGroupsInRoot">
- <Value>To export to this file format, the root group must have at least one subgroup.</Value>
- </Data>
- <Data Name="FormatOnlyOneAttachment">
- <Value>This file format only supports one attachment per entry. Only the first attachment is saved, the others are ignored.</Value>
- </Data>
- <Data Name="Frequency">
- <Value>Frequency</Value>
- </Data>
- <Data Name="General">
- <Value>General</Value>
- </Data>
- <Data Name="GenerateCount">
- <Value>Generated Passwords Count</Value>
- </Data>
- <Data Name="GenerateCountDesc">
- <Value>Enter number of passwords to generate.</Value>
- </Data>
- <Data Name="GenerateCountLongDesc">
- <Value>Please enter the number of passwords to generate:</Value>
- </Data>
- <Data Name="GeneratedPasswordSamples">
- <Value>Generated Passwords Samples</Value>
- </Data>
- <Data Name="GeneratePassword">
- <Value>Generate a password</Value>
- </Data>
- <Data Name="GenericCsvImporter">
- <Value>Generic CSV Importer</Value>
- </Data>
- <Data Name="GenProfileRemove">
- <Value>Remove selected profile</Value>
- </Data>
- <Data Name="GenProfileRemoveDesc">
- <Value>Remove the currently selected profile.</Value>
- </Data>
- <Data Name="GenProfileSave">
- <Value>Save as Profile</Value>
- </Data>
- <Data Name="GenProfileSaveDesc">
- <Value>Save current settings as a profile.</Value>
- </Data>
- <Data Name="GenProfileSaveDescLong">
- <Value>Please enter a name for the new password generator profile, or select an existing profile name to overwrite it:</Value>
- </Data>
- <Data Name="GenPwBasedOnPrevious">
- <Value>Derive from previous password</Value>
- </Data>
- <Data Name="Group">
- <Value>Group</Value>
- </Data>
- <Data Name="GroupCannotStoreEntries">
- <Value>The selected group cannot store any entries.</Value>
- </Data>
- <Data Name="HelpSourceNoLocalOption">
- <Value>This option is disabled, because local help is not installed.</Value>
- </Data>
- <Data Name="HelpSourceSelection">
- <Value>Help Source Selection</Value>
- </Data>
- <Data Name="HelpSourceSelectionDesc">
- <Value>Choose between local help and online help center.</Value>
- </Data>
- <Data Name="HideUsingAsterisks">
- <Value>Hide field using asterisks</Value>
- </Data>
- <Data Name="HomeAddress">
- <Value>Home Address</Value>
- </Data>
- <Data Name="Homebanking">
- <Value>Homebanking</Value>
- </Data>
- <Data Name="HomeFax">
- <Value>Home Fax</Value>
- </Data>
- <Data Name="HomepageVisitQuestion">
- <Value>Do you want to visit the KeePass homepage now?</Value>
- </Data>
- <Data Name="HomeTel">
- <Value>Home Tel.</Value>
- </Data>
- <Data Name="Iban">
- <Value>IBAN</Value>
- </Data>
- <Data Name="Id">
- <Value>ID</Value>
- </Data>
- <Data Name="Ignore">
- <Value>Ignore</Value>
- </Data>
- <Data Name="ImageFormatFeatureUnsupported">
- <Value>This file uses a file format feature that is not supported.</Value>
- </Data>
- <Data Name="ImageViewer">
- <Value>Image Viewer</Value>
- </Data>
- <Data Name="Import">
- <Value>Import</Value>
- </Data>
- <Data Name="ImportBehavior">
- <Value>Import Behavior</Value>
- </Data>
- <Data Name="ImportBehaviorDesc">
- <Value>Select an import method.</Value>
- </Data>
- <Data Name="ImportFailed">
- <Value>Import failed.</Value>
- </Data>
- <Data Name="ImportFileDesc">
- <Value>Import an external file.</Value>
- </Data>
- <Data Name="ImportFilesPrompt">
- <Value>Files to be imported:</Value>
- </Data>
- <Data Name="ImportFileTitle">
- <Value>Import File/Data</Value>
- </Data>
- <Data Name="ImportFinished">
- <Value>The import process has finished!</Value>
- </Data>
- <Data Name="ImportingStatusMsg">
- <Value>Importing...</Value>
- </Data>
- <Data Name="ImportMustRead">
- <Value>It is indispensable that you read the documentation about this import method before continuing.</Value>
- </Data>
- <Data Name="ImportMustReadQuestion">
- <Value>Have you understood how the import process works and want to start it now?</Value>
- </Data>
- <Data Name="Internet">
- <Value>Internet</Value>
- </Data>
- <Data Name="InvalidFileStructure">
- <Value>Invalid file structure!</Value>
- </Data>
- <Data Name="InvalidKey">
- <Value>Invalid Key</Value>
- </Data>
- <Data Name="InvalidUrl">
- <Value>The specified URL is invalid.</Value>
- </Data>
- <Data Name="InvalidUserPassword">
- <Value>The specified user name / password combination is invalid.</Value>
- </Data>
- <Data Name="JobTitle">
- <Value>Job Title</Value>
- </Data>
- <Data Name="Kdb3KeePassLibC">
- <Value>The KeePassLibC library is required to open and save KDB files created by KeePass 1.x.</Value>
- </Data>
- <Data Name="KdbxFiles">
- <Value>KeePass KDBX Files</Value>
- </Data>
- <Data Name="KeePassLibCLong">
- <Value>KeePassLibC (1.x File Support)</Value>
- </Data>
- <Data Name="KeePassLibCNotFound">
- <Value>KeePassLibC could not be found.</Value>
- </Data>
- <Data Name="KeyboardKeyAlt">
- <Value>Alt</Value>
- </Data>
- <Data Name="KeyboardKeyControl">
- <Value>Control</Value>
- </Data>
- <Data Name="KeyboardKeyModifiers">
- <Value>Key Modifiers</Value>
- </Data>
- <Data Name="KeyboardKeyShift">
- <Value>Shift</Value>
- </Data>
- <Data Name="KeyFileCreate">
- <Value>Create a new key file</Value>
- </Data>
- <Data Name="KeyFileError">
- <Value>The specified key file could not be found or its format is unknown.</Value>
- </Data>
- <Data Name="KeyFiles">
- <Value>Key Files</Value>
- </Data>
- <Data Name="KeyFileSelect">
- <Value>Select key file manually</Value>
- </Data>
- <Data Name="KeyFileUseExisting">
- <Value>Use an existing file as key file</Value>
- </Data>
- <Data Name="KeystrokeSequence">
- <Value>Keystroke Sequence</Value>
- </Data>
- <Data Name="LanguageSelected">
- <Value>The selected language has been activated. KeePass must be restarted in order to load the language.</Value>
- </Data>
- <Data Name="LastAccessTime">
- <Value>Last Access Time</Value>
- </Data>
- <Data Name="LastModificationTime">
- <Value>Last Modification Time</Value>
- </Data>
- <Data Name="LimitSingleInstance">
- <Value>Limit to single instance</Value>
- </Data>
- <Data Name="Locked">
- <Value>Locked</Value>
- </Data>
- <Data Name="LockMenuLock">
- <Value>&Lock Workspace</Value>
- </Data>
- <Data Name="LockMenuUnlock">
- <Value>Un&lock Workspace</Value>
- </Data>
- <Data Name="LockOnMinimize">
- <Value>Lock workspace when minimizing main window</Value>
- </Data>
- <Data Name="LockOnSessionLock">
- <Value>Lock workspace when locking Windows, switching user or sleeping</Value>
- </Data>
- <Data Name="MainWindow">
- <Value>Main Window</Value>
- </Data>
- <Data Name="MasterKeyChanged">
- <Value>Composite master key has been changed!</Value>
- </Data>
- <Data Name="MasterKeyChangedSavePrompt">
- <Value>Save the database now in order to get the new key applied.</Value>
- </Data>
- <Data Name="MasterPasswordMinLengthFailed">
- <Value>The master password must be at least {PARAM} characters long!</Value>
- </Data>
- <Data Name="MasterPasswordMinQualityFailed">
- <Value>The estimated quality of the master password must be at least {PARAM} bits!</Value>
- </Data>
- <Data Name="Menus">
- <Value>Menus</Value>
- </Data>
- <Data Name="MergingData">
- <Value>Merging data...</Value>
- </Data>
- <Data Name="MinBalance">
- <Value>Min. Balance</Value>
- </Data>
- <Data Name="MinimizeAfterCopy">
- <Value>Minimize main window after copying data to the clipboard</Value>
- </Data>
- <Data Name="MinimizeAfterLocking">
- <Value>Minimize main window after locking the workspace</Value>
- </Data>
- <Data Name="MinimizeAfterOpeningDatabase">
- <Value>Minimize main window after opening a database</Value>
- </Data>
- <Data Name="MinimizeToTray">
- <Value>Minimize to tray instead of taskbar</Value>
- </Data>
- <Data Name="MobileTel">
- <Value>Mobile Tel.</Value>
- </Data>
- <Data Name="Name">
- <Value>Name</Value>
- </Data>
- <Data Name="NativeLibUse">
- <Value>Use native library for faster key transformations</Value>
- </Data>
- <Data Name="Navigation">
- <Value>Navigation</Value>
- </Data>
- <Data Name="Network">
- <Value>Network</Value>
- </Data>
- <Data Name="NeverExpires">
- <Value>Never expires</Value>
- </Data>
- <Data Name="NewDatabaseFileName">
- <Value>NewDatabase.kdbx</Value>
- </Data>
- <Data Name="NewGroup">
- <Value>New Group</Value>
- </Data>
- <Data Name="NewState">
- <Value>New state</Value>
- </Data>
- <Data Name="No">
- <Value>No</Value>
- </Data>
- <Data Name="NoFileAccessRead">
- <Value>The operating system didn't KeePass grant read access to the specified file.</Value>
- </Data>
- <Data Name="NoKeyFileSpecifiedMeta">
- <Value>(None)</Value>
- </Data>
- <Data Name="None">
- <Value>None</Value>
- </Data>
- <Data Name="Not">
- <Value>Not</Value>
- </Data>
- <Data Name="Notes">
- <Value>Notes</Value>
- </Data>
- <Data Name="NotInstalled">
- <Value>Not installed</Value>
- </Data>
- <Data Name="NoXslFile">
- <Value>The selected file isn't a valid XSL stylesheet.</Value>
- </Data>
- <Data Name="ObjectNotFound">
- <Value>The object with the specified name could not be found.</Value>
- </Data>
- <Data Name="Off">
- <Value>Off</Value>
- </Data>
- <Data Name="OfLower">
- <Value>of</Value>
- </Data>
- <Data Name="On">
- <Value>On</Value>
- </Data>
- <Data Name="OpenDatabaseFile">
- <Value>Open Database File</Value>
- </Data>
- <Data Name="OpenDatabaseFileStc">
- <Value>Open database file</Value>
- </Data>
- <Data Name="OpenedDatabaseFile">
- <Value>Opened database file</Value>
- </Data>
- <Data Name="OpeningDatabase">
- <Value>Opening password database...</Value>
- </Data>
- <Data Name="OptimizeForScreenReader">
- <Value>Optimize for screen reader (only enable if you're using a screen reader)</Value>
- </Data>
- <Data Name="Options">
- <Value>Options</Value>
- </Data>
- <Data Name="OptionsDesc">
- <Value>Here you can configure the global KeePass program options.</Value>
- </Data>
- <Data Name="OtherPlaceholders">
- <Value>Other Placeholders</Value>
- </Data>
- <Data Name="Overwrite">
- <Value>Overwrite</Value>
- </Data>
- <Data Name="OverwriteExistingFileQuestion">
- <Value>Overwrite the existing file?</Value>
- </Data>
- <Data Name="Pager">
- <Value>Pager</Value>
- </Data>
- <Data Name="ParamDescHelp">
- <Value>Detailed descriptions of all parameters can be found in the help manual.</Value>
- </Data>
- <Data Name="Password">
- <Value>Password</Value>
- </Data>
- <Data Name="PasswordManagers">
- <Value>Password Managers</Value>
- </Data>
- <Data Name="PasswordOptions">
- <Value>Password Generation Options</Value>
- </Data>
- <Data Name="PasswordOptionsDesc">
- <Value>Here you can define properties of generated passwords.</Value>
- </Data>
- <Data Name="PasswordPrompt">
- <Value>Enter the password:</Value>
- </Data>
- <Data Name="PasswordRepeatFailed">
- <Value>Password and repeated password aren't identical!</Value>
- </Data>
- <Data Name="Paste">
- <Value>Paste</Value>
- </Data>
- <Data Name="PerformGlobalAutoType">
- <Value>Perform global auto-type</Value>
- </Data>
- <Data Name="PickCharacters">
- <Value>Pick Characters</Value>
- </Data>
- <Data Name="PickCharactersDesc">
- <Value>Select the requested character positions.</Value>
- </Data>
- <Data Name="PickIcon">
- <Value>Pick an icon.</Value>
- </Data>
- <Data Name="Plugin">
- <Value>Plugin</Value>
- </Data>
- <Data Name="PluginFailedToLoad">
- <Value>The following plugin cannot be loaded:</Value>
- </Data>
- <Data Name="Plugins">
- <Value>Plugins</Value>
- </Data>
- <Data Name="PluginsDesc">
- <Value>Here you can configure all loaded KeePass plugins.</Value>
- </Data>
- <Data Name="PolicyAutoTypeDesc">
- <Value>Allow auto-typing entries to other windows.</Value>
- </Data>
- <Data Name="PolicyClipboardDesc">
- <Value>Allow copying entry information to clipboard (main window only).</Value>
- </Data>
- <Data Name="PolicyDisallowed">
- <Value>This operation is disallowed by the application policy. Ask your administrator to allow this operation.</Value>
- </Data>
- <Data Name="PolicyDragDropDesc">
- <Value>Allow sending information to other windows using drag&drop.</Value>
- </Data>
- <Data Name="PolicyExportDesc">
- <Value>Allow exporting entries to (non-encrypted) file formats.</Value>
- </Data>
- <Data Name="PolicyImportDesc">
- <Value>Allow importing entries from external files.</Value>
- </Data>
- <Data Name="PolicyPluginsDesc">
- <Value>Allow loading plugins to extend KeePass functionality.</Value>
- </Data>
- <Data Name="PolicyPrintDesc">
- <Value>Allow printing password entry lists.</Value>
- </Data>
- <Data Name="PolicyRequiredFlag">
- <Value>The following policy flag is required</Value>
- </Data>
- <Data Name="PolicySaveDatabaseDesc">
- <Value>Allow saving databases to disk/URL.</Value>
- </Data>
- <Data Name="Print">
- <Value>Print</Value>
- </Data>
- <Data Name="PrintDesc">
- <Value>Print password entries.</Value>
- </Data>
- <Data Name="QuickSearch">
- <Value>Quick Search</Value>
- </Data>
- <Data Name="QuickSearchExcludeExpired">
- <Value>Exclude expired entries in quick searches (toolbar)</Value>
- </Data>
- <Data Name="Ready">
- <Value>Ready.</Value>
- </Data>
- <Data Name="RecycleBin">
- <Value>Recycle Bin</Value>
- </Data>
- <Data Name="RememberHidingSettings">
- <Value>Remember password hiding setting in 'Edit Entry' window</Value>
- </Data>
- <Data Name="RestartKeePassQuestion">
- <Value>Do you wish to restart KeePass now?</Value>
- </Data>
- <Data Name="RoutingCode">
- <Value>Routing Code</Value>
- </Data>
- <Data Name="SampleEntry">
- <Value>Sample Entry</Value>
- </Data>
- <Data Name="Save">
- <Value>Save</Value>
- </Data>
- <Data Name="SaveBeforeCloseQuestion">
- <Value>Do you want to save the changes before closing?</Value>
- </Data>
- <Data Name="SaveBeforeCloseTitle">
- <Value>KeePass - Save Before Close/Lock?</Value>
- </Data>
- <Data Name="SaveDatabase">
- <Value>Save Database</Value>
- </Data>
- <Data Name="SavedDatabaseFile">
- <Value>Saved database file</Value>
- </Data>
- <Data Name="SavingDatabase">
- <Value>Saving database...</Value>
- </Data>
- <Data Name="SavingDatabaseFile">
- <Value>Saving database file</Value>
- </Data>
- <Data Name="Search">
- <Value>Search...</Value>
- </Data>
- <Data Name="SearchDesc">
- <Value>Search the password database for entries.</Value>
- </Data>
- <Data Name="SearchGroupName">
- <Value>Search Results</Value>
- </Data>
- <Data Name="SearchItemsFoundSmall">
- <Value>entries found.</Value>
- </Data>
- <Data Name="SearchKeyFilesOnRemovable">
- <Value>Automatically search key files on removable media</Value>
- </Data>
- <Data Name="SearchQuickPrompt">
- <Value>Type to search the database</Value>
- </Data>
- <Data Name="SearchResultsInSeparator">
- <Value>in</Value>
- </Data>
- <Data Name="SearchTitle">
- <Value>Find</Value>
- </Data>
- <Data Name="SelectAll">
- <Value>Select All</Value>
- </Data>
- <Data Name="SelectColor">
- <Value>Select Color</Value>
- </Data>
- <Data Name="SelectDifferentGroup">
- <Value>Please select a different group.</Value>
- </Data>
- <Data Name="SelectedLower">
- <Value>selected</Value>
- </Data>
- <Data Name="SelectFile">
- <Value>Select a file.</Value>
- </Data>
- <Data Name="SelectIcon">
- <Value>Select an icon</Value>
- </Data>
- <Data Name="SelectLanguage">
- <Value>Select Language</Value>
- </Data>
- <Data Name="SelectLanguageDesc">
- <Value>Here you can select a different user interface language.</Value>
- </Data>
- <Data Name="SelfTestFailed">
- <Value>One or more of the KeePass self-tests failed.</Value>
- </Data>
- <Data Name="ShowAllEntries">
- <Value>Show All Entries</Value>
- </Data>
- <Data Name="ShowExpiredEntries">
- <Value>Show Expired Entries</Value>
- </Data>
- <Data Name="ShowFullPathInTitleBar">
- <Value>Show full path in title bar (instead of file name only)</Value>
- </Data>
- <Data Name="ShowGridLines">
- <Value>Show grid lines in password entry list</Value>
- </Data>
- <Data Name="ShowIn">
- <Value>Show in</Value>
- </Data>
- <Data Name="ShowTrayOnlyIfTrayed">
- <Value>Show tray icon only if main window has been sent to tray</Value>
- </Data>
- <Data Name="SoonToExpireEntries">
- <Value>Expired Entries and Entries That Will Expire Soon</Value>
- </Data>
- <Data Name="SortCode">
- <Value>Sort Code</Value>
- </Data>
- <Data Name="SpecialKeys">
- <Value>Special Keys</Value>
- </Data>
- <Data Name="StandardExpireSelect">
- <Value>Select one of the standard expire times</Value>
- </Data>
- <Data Name="StandardFields">
- <Value>Standard Fields</Value>
- </Data>
- <Data Name="StartAndExit">
- <Value>Start and Exit</Value>
- </Data>
- <Data Name="StartMinimizedAndLocked">
- <Value>Start minimized and locked</Value>
- </Data>
- <Data Name="StartsWith">
- <Value>Starts with</Value>
- </Data>
- <Data Name="Success">
- <Value>Success.</Value>
- </Data>
- <Data Name="SwiftCode">
- <Value>SWIFT Code</Value>
- </Data>
- <Data Name="SyncFailed">
- <Value>Synchronization failed.</Value>
- </Data>
- <Data Name="Synchronize">
- <Value>Synchronize</Value>
- </Data>
- <Data Name="Synchronizing">
- <Value>Synchronizing...</Value>
- </Data>
- <Data Name="SynchronizingHint">
- <Value>Make sure that the two databases use the same composite master key. This is required for synchronization.</Value>
- </Data>
- <Data Name="SyncSuccess">
- <Value>Synchronization completed successfully.</Value>
- </Data>
- <Data Name="System">
- <Value>System</Value>
- </Data>
- <Data Name="SystemCodePage">
- <Value>System Code Page</Value>
- </Data>
- <Data Name="TAccountInfoTel">
- <Value>Account Info Tel.</Value>
- </Data>
- <Data Name="TAccountNames">
- <Value>Account names</Value>
- </Data>
- <Data Name="TAccountNumber">
- <Value>Account Number</Value>
- </Data>
- <Data Name="TAccountType">
- <Value>Account Type</Value>
- </Data>
- <Data Name="TanWizard">
- <Value>TAN Wizard</Value>
- </Data>
- <Data Name="TanWizardDesc">
- <Value>With this TAN wizard you can easily add TAN entries.</Value>
- </Data>
- <Data Name="TargetWindow">
- <Value>Target Window</Value>
- </Data>
- <Data Name="TextViewer">
- <Value>Text Viewer</Value>
- </Data>
- <Data Name="TimeSpan">
- <Value>Time span</Value>
- </Data>
- <Data Name="Title">
- <Value>Title</Value>
- </Data>
- <Data Name="Toggle">
- <Value>Toggle</Value>
- </Data>
- <Data Name="TogglePasswordAsterisks">
- <Value>Show/hide password using asterisks</Value>
- </Data>
- <Data Name="ToolBarNew">
- <Value>New...</Value>
- </Data>
- <Data Name="ToolBarOpen">
- <Value>Open...</Value>
- </Data>
- <Data Name="ToolBarSaveAll">
- <Value>Save All</Value>
- </Data>
- <Data Name="TooManyFilesError">
- <Value>Too many files have been selected. Select smaller groups and repeat the current procedure a few times.</Value>
- </Data>
- <Data Name="TransfersOf">
- <Value>Transfers Of</Value>
- </Data>
- <Data Name="TransformationRounds1SecHint">
- <Value>Compute the number of rounds that lead to a delay of 1 second on this computer.</Value>
- </Data>
- <Data Name="TriggerActionTypeUnknown">
- <Value>The trigger action type is unknown.</Value>
- </Data>
- <Data Name="TriggerAdd">
- <Value>Add Trigger</Value>
- </Data>
- <Data Name="TriggerAddDesc">
- <Value>Create a new workflow automation.</Value>
- </Data>
- <Data Name="TriggerConditionTypeUnknown">
- <Value>The trigger condition type is unknown.</Value>
- </Data>
- <Data Name="TriggerEdit">
- <Value>Edit Trigger</Value>
- </Data>
- <Data Name="TriggerEditDesc">
- <Value>Modify an existing workflow automation.</Value>
- </Data>
- <Data Name="TriggerEventTypeUnknown">
- <Value>The trigger event type is unknown.</Value>
- </Data>
- <Data Name="TriggerExecutionFailed">
- <Value>Trigger execution failed</Value>
- </Data>
- <Data Name="TriggerName">
- <Value>Trigger name</Value>
- </Data>
- <Data Name="Triggers">
- <Value>Triggers</Value>
- </Data>
- <Data Name="TriggersDesc">
- <Value>Automate workflows using the trigger system.</Value>
- </Data>
- <Data Name="TriggerStateChange">
- <Value>Change trigger on/off state</Value>
- </Data>
- <Data Name="TypeUnknownHint">
- <Value>A newer KeePass version or a plugin might be required for this type.</Value>
- </Data>
- <Data Name="Undo">
- <Value>Undo</Value>
- </Data>
- <Data Name="Unknown">
- <Value>Unknown</Value>
- </Data>
- <Data Name="UnknownError">
- <Value>An unknown error occurred.</Value>
- </Data>
- <Data Name="UnknownFileVersion">
- <Value>Unknown file version!</Value>
- </Data>
- <Data Name="UpdateCheckingFailed">
- <Value>Update checking failed.</Value>
- </Data>
- <Data Name="Url">
- <Value>URL</Value>
- </Data>
- <Data Name="UrlOpenDesc">
- <Value>Open a database stored on a server.</Value>
- </Data>
- <Data Name="UrlOpenTitle">
- <Value>Open From URL</Value>
- </Data>
- <Data Name="UrlOverride">
- <Value>URL Override</Value>
- </Data>
- <Data Name="UrlSaveDesc">
- <Value>Save current database on a server.</Value>
- </Data>
- <Data Name="UrlSaveTitle">
- <Value>Save To URL</Value>
- </Data>
- <Data Name="UserName">
- <Value>User Name</Value>
- </Data>
- <Data Name="UserNamePrompt">
- <Value>Enter the user name:</Value>
- </Data>
- <Data Name="Uuid">
- <Value>UUID</Value>
- </Data>
- <Data Name="Value">
- <Value>Value</Value>
- </Data>
- <Data Name="Version">
- <Value>Version</Value>
- </Data>
- <Data Name="ViewEntry">
- <Value>View Entry</Value>
- </Data>
- <Data Name="ViewEntryDesc">
- <Value>You're viewing a password entry.</Value>
- </Data>
- <Data Name="Wait">
- <Value>Wait</Value>
- </Data>
- <Data Name="Warnings">
- <Value>Warnings</Value>
- </Data>
- <Data Name="WebBrowser">
- <Value>Web Browser</Value>
- </Data>
- <Data Name="WebPage">
- <Value>Web Page</Value>
- </Data>
- <Data Name="WebSiteLogin">
- <Value>Web Site Login</Value>
- </Data>
- <Data Name="WebSites">
- <Value>Web Sites</Value>
- </Data>
- <Data Name="WindowsOS">
- <Value>Windows</Value>
- </Data>
- <Data Name="WorkFax">
- <Value>Work Fax</Value>
- </Data>
- <Data Name="WorkspaceLocked">
- <Value>Workspace Locked</Value>
- </Data>
- <Data Name="WorkTel">
- <Value>Work Tel.</Value>
- </Data>
- <Data Name="XslExporter">
- <Value>Transform using XSL Stylesheet</Value>
- </Data>
- <Data Name="XslFileType">
- <Value>XSL Stylesheets</Value>
- </Data>
- <Data Name="XslSelectFile">
- <Value>Select XSL Transformation File</Value>
- </Data>
- <Data Name="XslStylesheets">
- <Value>XSL Stylesheets for KDB4 XML</Value>
- </Data>
- <Data Name="Yes">
- <Value>Yes</Value>
- </Data>
- </StringTable>
-
- <StringTable Name="KLRes" Namespace="KeePassLib.Resources">
- <Data Name="CryptoStreamFailed">
- <Value>Failed to initialize encryption/decryption stream!</Value>
- </Data>
- <Data Name="EncAlgorithmAes">
- <Value>AES/Rijndael (256-Bit Key)</Value>
- </Data>
- <Data Name="ErrorFeedbackRequest">
- <Value>An extended error report has been copied to the clipboard. Please send it to the KeePass developers.</Value>
- </Data>
- <Data Name="FatalError">
- <Value>Fatal Error</Value>
- </Data>
- <Data Name="FatalErrorText">
- <Value>A fatal error has occurred!</Value>
- </Data>
- <Data Name="FileCorrupted">
- <Value>The file is corrupted.</Value>
- </Data>
- <Data Name="FileHeaderEndEarly">
- <Value>The file header is corrupted! Some header data was declared but is not present.</Value>
- </Data>
- <Data Name="FileLoadFailed">
- <Value>Failed to load the specified file!</Value>
- </Data>
- <Data Name="FileNewVerReq">
- <Value>A newer KeePass version is required to open this file.</Value>
- </Data>
- <Data Name="FileSaveCorruptionWarning">
- <Value>The target file might be in a corrupted state. Please try saving again, and if that fails, save the database to a different location.</Value>
- </Data>
- <Data Name="FileSaveFailed">
- <Value>Failed to save the current database to the specified location!</Value>
- </Data>
- <Data Name="FileSigInvalid">
- <Value>The file signature is invalid. Either the file isn't a KeePass database file at all or it is corrupted.</Value>
- </Data>
- <Data Name="FileUnknownCipher">
- <Value>The file is encrypted using an unknown encryption algorithm!</Value>
- </Data>
- <Data Name="FileUnknownCompression">
- <Value>The file is compressed using an unknown compression algorithm!</Value>
- </Data>
- <Data Name="FileVersionUnsupported">
- <Value>The file version is unsupported.</Value>
- </Data>
- <Data Name="FinalKeyCreationFailed">
- <Value>Failed to create the final encryption/decryption key!</Value>
- </Data>
- <Data Name="FrameworkNotImplExcp">
- <Value>The .NET framework/runtime, under which KeePass is currently running, does not support this operation.</Value>
- </Data>
- <Data Name="InvalidCompositeKey">
- <Value>The composite key is invalid!</Value>
- </Data>
- <Data Name="InvalidCompositeKeyHint">
- <Value>Make sure the composite key is correct and try again.</Value>
- </Data>
- <Data Name="InvalidDataWhileDecoding">
- <Value>Found invalid data while decoding.</Value>
- </Data>
- <Data Name="KeePass1xHint">
- <Value>In order to import KeePass 1.x KDB files, create a new 2.x database file and click 'File' -> 'Import' in the main menu. In the import dialog, choose 'KeePass KDB (1.x)' as file format.</Value>
- </Data>
- <Data Name="MasterSeedLengthInvalid">
- <Value>The length of the master key seed is invalid!</Value>
- </Data>
- <Data Name="OldFormat">
- <Value>The selected file appears to be an old format</Value>
- </Data>
- <Data Name="UnknownHeaderId">
- <Value>Unknown header ID!</Value>
- </Data>
- <Data Name="UserAccountKeyError">
- <Value>The operating system did not grant KeePass read/write access to the user profile folder, where the protected user key is stored.</Value>
- </Data>
- </StringTable>
-</Translation>
diff --git a/Ext/DeprecatedSources/ImportCsvForm_120218.Designer.cs b/Ext/DeprecatedSources/ImportCsvForm_120218.Designer.cs
deleted file mode 100644
index a83ebbb..0000000
--- a/Ext/DeprecatedSources/ImportCsvForm_120218.Designer.cs
+++ /dev/null
@@ -1,262 +0,0 @@
-namespace KeePass.Forms
-{
- partial class ImportCsvForm
- {
- /// <summary>
- /// Erforderliche Designervariable.
- /// </summary>
- private System.ComponentModel.IContainer components = null;
-
- /// <summary>
- /// Verwendete Ressourcen bereinigen.
- /// </summary>
- /// <param name="disposing">True, wenn verwaltete Ressourcen gelöscht werden sollen; andernfalls False.</param>
- protected override void Dispose(bool disposing)
- {
- if(disposing && (components != null))
- {
- components.Dispose();
- }
- base.Dispose(disposing);
- }
-
- #region Vom Windows Form-Designer generierter Code
-
- /// <summary>
- /// Erforderliche Methode für die Designerunterstützung.
- /// Der Inhalt der Methode darf nicht mit dem Code-Editor geändert werden.
- /// </summary>
- private void InitializeComponent()
- {
- this.m_btnOK = new System.Windows.Forms.Button();
- this.m_btnCancel = new System.Windows.Forms.Button();
- this.m_lblFileEncoding = new System.Windows.Forms.Label();
- this.m_cmbEncoding = new System.Windows.Forms.ComboBox();
- this.m_lvPreview = new KeePass.UI.CustomListViewEx();
- this.m_tbSourcePreview = new System.Windows.Forms.TextBox();
- this.m_lblSourcePreview = new System.Windows.Forms.Label();
- this.m_lvHeaderOrder = new KeePass.UI.CustomListViewEx();
- this.m_lblOrder = new System.Windows.Forms.Label();
- this.m_lblOrderHint = new System.Windows.Forms.Label();
- this.m_lblPreview = new System.Windows.Forms.Label();
- this.m_lblDelimiter = new System.Windows.Forms.Label();
- this.m_tbSepChar = new System.Windows.Forms.TextBox();
- this.m_cbDoubleQuoteToSingle = new System.Windows.Forms.CheckBox();
- this.m_pbRender = new System.Windows.Forms.ProgressBar();
- this.m_btnPreviewRefresh = new System.Windows.Forms.Button();
- this.SuspendLayout();
- //
- // m_btnOK
- //
- this.m_btnOK.DialogResult = System.Windows.Forms.DialogResult.OK;
- this.m_btnOK.Location = new System.Drawing.Point(702, 450);
- this.m_btnOK.Name = "m_btnOK";
- this.m_btnOK.Size = new System.Drawing.Size(75, 23);
- this.m_btnOK.TabIndex = 0;
- this.m_btnOK.Text = "&Import";
- this.m_btnOK.UseVisualStyleBackColor = true;
- this.m_btnOK.Click += new System.EventHandler(this.OnBtnOK);
- //
- // m_btnCancel
- //
- this.m_btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
- this.m_btnCancel.Location = new System.Drawing.Point(702, 479);
- this.m_btnCancel.Name = "m_btnCancel";
- this.m_btnCancel.Size = new System.Drawing.Size(75, 23);
- this.m_btnCancel.TabIndex = 1;
- this.m_btnCancel.Text = "&Cancel";
- this.m_btnCancel.UseVisualStyleBackColor = true;
- this.m_btnCancel.Click += new System.EventHandler(this.OnBtnCancel);
- //
- // m_lblFileEncoding
- //
- this.m_lblFileEncoding.AutoSize = true;
- this.m_lblFileEncoding.Location = new System.Drawing.Point(9, 15);
- this.m_lblFileEncoding.Name = "m_lblFileEncoding";
- this.m_lblFileEncoding.Size = new System.Drawing.Size(73, 13);
- this.m_lblFileEncoding.TabIndex = 2;
- this.m_lblFileEncoding.Text = "File encoding:";
- //
- // m_cmbEncoding
- //
- this.m_cmbEncoding.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
- this.m_cmbEncoding.FormattingEnabled = true;
- this.m_cmbEncoding.Location = new System.Drawing.Point(105, 12);
- this.m_cmbEncoding.Name = "m_cmbEncoding";
- this.m_cmbEncoding.Size = new System.Drawing.Size(228, 21);
- this.m_cmbEncoding.TabIndex = 3;
- this.m_cmbEncoding.SelectedIndexChanged += new System.EventHandler(this.OnCmbEncodingSelectedIndexChanged);
- //
- // m_lvPreview
- //
- this.m_lvPreview.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable;
- this.m_lvPreview.Location = new System.Drawing.Point(12, 262);
- this.m_lvPreview.Name = "m_lvPreview";
- this.m_lvPreview.ShowItemToolTips = true;
- this.m_lvPreview.Size = new System.Drawing.Size(684, 240);
- this.m_lvPreview.TabIndex = 14;
- this.m_lvPreview.UseCompatibleStateImageBehavior = false;
- this.m_lvPreview.View = System.Windows.Forms.View.Details;
- //
- // m_tbSourcePreview
- //
- this.m_tbSourcePreview.AcceptsReturn = true;
- this.m_tbSourcePreview.Location = new System.Drawing.Point(105, 39);
- this.m_tbSourcePreview.Multiline = true;
- this.m_tbSourcePreview.Name = "m_tbSourcePreview";
- this.m_tbSourcePreview.ReadOnly = true;
- this.m_tbSourcePreview.Size = new System.Drawing.Size(672, 90);
- this.m_tbSourcePreview.TabIndex = 5;
- //
- // m_lblSourcePreview
- //
- this.m_lblSourcePreview.AutoSize = true;
- this.m_lblSourcePreview.Location = new System.Drawing.Point(9, 42);
- this.m_lblSourcePreview.Name = "m_lblSourcePreview";
- this.m_lblSourcePreview.Size = new System.Drawing.Size(68, 13);
- this.m_lblSourcePreview.TabIndex = 4;
- this.m_lblSourcePreview.Text = "Source data:";
- //
- // m_lvHeaderOrder
- //
- this.m_lvHeaderOrder.AllowColumnReorder = true;
- this.m_lvHeaderOrder.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable;
- this.m_lvHeaderOrder.Location = new System.Drawing.Point(105, 135);
- this.m_lvHeaderOrder.Name = "m_lvHeaderOrder";
- this.m_lvHeaderOrder.Size = new System.Drawing.Size(672, 53);
- this.m_lvHeaderOrder.TabIndex = 7;
- this.m_lvHeaderOrder.UseCompatibleStateImageBehavior = false;
- this.m_lvHeaderOrder.View = System.Windows.Forms.View.Details;
- //
- // m_lblOrder
- //
- this.m_lblOrder.AutoSize = true;
- this.m_lblOrder.Location = new System.Drawing.Point(9, 141);
- this.m_lblOrder.Name = "m_lblOrder";
- this.m_lblOrder.Size = new System.Drawing.Size(90, 13);
- this.m_lblOrder.TabIndex = 6;
- this.m_lblOrder.Text = "Define field order:";
- //
- // m_lblOrderHint
- //
- this.m_lblOrderHint.AutoSize = true;
- this.m_lblOrderHint.Location = new System.Drawing.Point(102, 191);
- this.m_lblOrderHint.Name = "m_lblOrderHint";
- this.m_lblOrderHint.Size = new System.Drawing.Size(499, 13);
- this.m_lblOrderHint.TabIndex = 8;
- this.m_lblOrderHint.Text = "Drag&&drop the columns to define the order of the fields in the CSV file. \"(Ignor" +
- "e)\" columns will be ignored.";
- //
- // m_lblPreview
- //
- this.m_lblPreview.AutoSize = true;
- this.m_lblPreview.Location = new System.Drawing.Point(9, 246);
- this.m_lblPreview.Name = "m_lblPreview";
- this.m_lblPreview.Size = new System.Drawing.Size(125, 13);
- this.m_lblPreview.TabIndex = 12;
- this.m_lblPreview.Text = "Imported entries preview:";
- //
- // m_lblDelimiter
- //
- this.m_lblDelimiter.AutoSize = true;
- this.m_lblDelimiter.Location = new System.Drawing.Point(9, 216);
- this.m_lblDelimiter.Name = "m_lblDelimiter";
- this.m_lblDelimiter.Size = new System.Drawing.Size(73, 13);
- this.m_lblDelimiter.TabIndex = 9;
- this.m_lblDelimiter.Text = "Field delimiter:";
- //
- // m_tbSepChar
- //
- this.m_tbSepChar.Location = new System.Drawing.Point(105, 213);
- this.m_tbSepChar.Name = "m_tbSepChar";
- this.m_tbSepChar.Size = new System.Drawing.Size(35, 20);
- this.m_tbSepChar.TabIndex = 10;
- this.m_tbSepChar.TextChanged += new System.EventHandler(this.OnDelimiterTextChanged);
- //
- // m_cbDoubleQuoteToSingle
- //
- this.m_cbDoubleQuoteToSingle.AutoSize = true;
- this.m_cbDoubleQuoteToSingle.Location = new System.Drawing.Point(165, 215);
- this.m_cbDoubleQuoteToSingle.Name = "m_cbDoubleQuoteToSingle";
- this.m_cbDoubleQuoteToSingle.Size = new System.Drawing.Size(238, 17);
- this.m_cbDoubleQuoteToSingle.TabIndex = 11;
- this.m_cbDoubleQuoteToSingle.Text = "Replace double quote (\"\") by single quote (\")";
- this.m_cbDoubleQuoteToSingle.UseVisualStyleBackColor = true;
- this.m_cbDoubleQuoteToSingle.CheckedChanged += new System.EventHandler(this.OnDoubleQuoteCheckedChanged);
- //
- // m_pbRender
- //
- this.m_pbRender.Location = new System.Drawing.Point(142, 246);
- this.m_pbRender.Name = "m_pbRender";
- this.m_pbRender.Size = new System.Drawing.Size(554, 13);
- this.m_pbRender.Style = System.Windows.Forms.ProgressBarStyle.Continuous;
- this.m_pbRender.TabIndex = 13;
- //
- // m_btnPreviewRefresh
- //
- this.m_btnPreviewRefresh.Location = new System.Drawing.Point(702, 262);
- this.m_btnPreviewRefresh.Name = "m_btnPreviewRefresh";
- this.m_btnPreviewRefresh.Size = new System.Drawing.Size(75, 23);
- this.m_btnPreviewRefresh.TabIndex = 15;
- this.m_btnPreviewRefresh.Text = "&Refresh";
- this.m_btnPreviewRefresh.UseVisualStyleBackColor = true;
- this.m_btnPreviewRefresh.Click += new System.EventHandler(this.OnBtnPreviewRefresh);
- //
- // ImportCsvForm
- //
- this.AcceptButton = this.m_btnOK;
- this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
- this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.CancelButton = this.m_btnCancel;
- this.ClientSize = new System.Drawing.Size(789, 514);
- this.Controls.Add(this.m_btnPreviewRefresh);
- this.Controls.Add(this.m_pbRender);
- this.Controls.Add(this.m_cbDoubleQuoteToSingle);
- this.Controls.Add(this.m_tbSepChar);
- this.Controls.Add(this.m_lblDelimiter);
- this.Controls.Add(this.m_lblPreview);
- this.Controls.Add(this.m_lblOrderHint);
- this.Controls.Add(this.m_lblOrder);
- this.Controls.Add(this.m_lvHeaderOrder);
- this.Controls.Add(this.m_lblSourcePreview);
- this.Controls.Add(this.m_tbSourcePreview);
- this.Controls.Add(this.m_lvPreview);
- this.Controls.Add(this.m_cmbEncoding);
- this.Controls.Add(this.m_lblFileEncoding);
- this.Controls.Add(this.m_btnCancel);
- this.Controls.Add(this.m_btnOK);
- this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
- this.MaximizeBox = false;
- this.MinimizeBox = false;
- this.Name = "ImportCsvForm";
- this.ShowInTaskbar = false;
- this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
- this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
- this.Text = "Generic CSV Importer";
- this.Load += new System.EventHandler(this.OnFormLoad);
- this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.OnFormClosed);
- this.ResumeLayout(false);
- this.PerformLayout();
-
- }
-
- #endregion
-
- private System.Windows.Forms.Button m_btnOK;
- private System.Windows.Forms.Button m_btnCancel;
- private System.Windows.Forms.Label m_lblFileEncoding;
- private System.Windows.Forms.ComboBox m_cmbEncoding;
- private KeePass.UI.CustomListViewEx m_lvPreview;
- private System.Windows.Forms.TextBox m_tbSourcePreview;
- private System.Windows.Forms.Label m_lblSourcePreview;
- private KeePass.UI.CustomListViewEx m_lvHeaderOrder;
- private System.Windows.Forms.Label m_lblOrder;
- private System.Windows.Forms.Label m_lblOrderHint;
- private System.Windows.Forms.Label m_lblPreview;
- private System.Windows.Forms.Label m_lblDelimiter;
- private System.Windows.Forms.TextBox m_tbSepChar;
- private System.Windows.Forms.CheckBox m_cbDoubleQuoteToSingle;
- private System.Windows.Forms.ProgressBar m_pbRender;
- private System.Windows.Forms.Button m_btnPreviewRefresh;
- }
-}
\ No newline at end of file
diff --git a/Ext/DeprecatedSources/ImportCsvForm_120218.cs b/Ext/DeprecatedSources/ImportCsvForm_120218.cs
deleted file mode 100644
index 3b9916f..0000000
--- a/Ext/DeprecatedSources/ImportCsvForm_120218.cs
+++ /dev/null
@@ -1,277 +0,0 @@
-/*
- KeePass Password Safe - The Open-Source Password Manager
- Copyright (C) 2003-2012 Dominik Reichl <dominik.reichl at t-online.de>
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-*/
-
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Drawing;
-using System.Text;
-using System.Windows.Forms;
-using System.Diagnostics;
-using System.IO;
-
-using KeePass.DataExchange;
-using KeePass.UI;
-using KeePass.Resources;
-
-using KeePassLib;
-using KeePassLib.Security;
-
-namespace KeePass.Forms
-{
- public partial class ImportCsvForm : Form
- {
- private PwDatabase m_pwDatabase = null;
- private byte[] m_pbInData = null;
- private bool m_bBlockChangedEvent = false;
-
- private string m_strSource = string.Empty;
-
- private const string StrEncAscii = "ASCII";
- private const string StrEncUtf7 = "UTF-7";
- private const string StrEncUtf8 = "UTF-8";
- private const string StrEncUtf32 = "UTF-32";
- private const string StrEncUnicode = "Unicode";
- private const string StrEncBigUnicode = "Big Endian Unicode";
-
- public void InitEx(PwDatabase pwStorage, byte[] pbInData)
- {
- m_pwDatabase = pwStorage;
- m_pbInData = pbInData;
- }
-
- public ImportCsvForm()
- {
- InitializeComponent();
- Program.Translation.ApplyTo(this);
- }
-
- private void OnFormLoad(object sender, EventArgs e)
- {
- Debug.Assert(m_pwDatabase != null); if(m_pwDatabase == null) throw new InvalidOperationException();
- Debug.Assert(m_pbInData != null); if(m_pbInData == null) throw new InvalidOperationException();
-
- GlobalWindowManager.AddWindow(this);
-
- this.Icon = Properties.Resources.KeePass;
-
- m_bBlockChangedEvent = true;
-
- AddFieldColumn(m_lvHeaderOrder, KPRes.Title, -1);
- AddFieldColumn(m_lvHeaderOrder, KPRes.UserName, -1);
- AddFieldColumn(m_lvHeaderOrder, KPRes.Password, -1);
- AddFieldColumn(m_lvHeaderOrder, KPRes.Url, -1);
- AddFieldColumn(m_lvHeaderOrder, KPRes.Notes, -1);
- AddFieldColumn(m_lvHeaderOrder, KPRes.Custom + " 1", -1);
- AddFieldColumn(m_lvHeaderOrder, KPRes.Custom + " 2", -1);
- AddFieldColumn(m_lvHeaderOrder, KPRes.Custom + " 3", -1);
- AddFieldColumn(m_lvHeaderOrder, "(" + KPRes.Ignore + ")", -1);
- AddFieldColumn(m_lvHeaderOrder, "(" + KPRes.Ignore + ")", -1);
- AddFieldColumn(m_lvHeaderOrder, "(" + KPRes.Ignore + ")", -1);
-
- foreach(ColumnHeader chHdr in m_lvHeaderOrder.Columns)
- chHdr.AutoResize(ColumnHeaderAutoResizeStyle.HeaderSize);
-
- const int nPrevColSize = 120;
- AddFieldColumn(m_lvPreview, KPRes.Title, nPrevColSize);
- AddFieldColumn(m_lvPreview, KPRes.UserName, nPrevColSize);
- AddFieldColumn(m_lvPreview, KPRes.Password, nPrevColSize);
- AddFieldColumn(m_lvPreview, KPRes.Url, nPrevColSize);
- AddFieldColumn(m_lvPreview, KPRes.Notes, nPrevColSize);
- AddFieldColumn(m_lvPreview, KPRes.Custom + " 1", nPrevColSize);
- AddFieldColumn(m_lvPreview, KPRes.Custom + " 2", nPrevColSize);
- AddFieldColumn(m_lvPreview, KPRes.Custom + " 3", nPrevColSize);
-
- m_cmbEncoding.Items.Add(KPRes.EncodingAnsi);
- m_cmbEncoding.Items.Add(StrEncAscii);
- m_cmbEncoding.Items.Add(StrEncUtf7);
- m_cmbEncoding.Items.Add(StrEncUtf8);
- m_cmbEncoding.Items.Add(StrEncUtf32);
- m_cmbEncoding.Items.Add(StrEncUnicode);
- m_cmbEncoding.Items.Add(StrEncBigUnicode);
-
- m_cmbEncoding.SelectedIndex = 0;
- m_tbSepChar.Text = ",";
- m_cbDoubleQuoteToSingle.Checked = true;
-
- m_bBlockChangedEvent = false;
-
- UpdateStringSource();
- UpdatePreview();
- }
-
- private static void AddFieldColumn(ListView lv, string strText, int nSize)
- {
- ColumnHeader hdr = lv.Columns.Add(strText);
-
- if(nSize >= 0) hdr.Width = nSize;
- }
-
- private void OnBtnOK(object sender, EventArgs e)
- {
- OnBtnPreviewRefresh(sender, e);
- Application.DoEvents();
-
- int nItem = 0;
- foreach(ListViewItem lvi in m_lvPreview.Items)
- {
- m_pbRender.Value = (100 * nItem) / m_lvPreview.Items.Count;
- ++nItem;
-
- PwEntry pe = new PwEntry(true, true);
- m_pwDatabase.RootGroup.AddEntry(pe, true);
-
- pe.Strings.Set(PwDefs.TitleField, new ProtectedString(
- m_pwDatabase.MemoryProtection.ProtectTitle, lvi.Text));
- pe.Strings.Set(PwDefs.UserNameField, new ProtectedString(
- m_pwDatabase.MemoryProtection.ProtectUserName, lvi.SubItems[1].Text));
- pe.Strings.Set(PwDefs.PasswordField, new ProtectedString(
- m_pwDatabase.MemoryProtection.ProtectPassword, lvi.SubItems[2].Text));
- pe.Strings.Set(PwDefs.UrlField, new ProtectedString(
- m_pwDatabase.MemoryProtection.ProtectUrl, lvi.SubItems[3].Text));
- pe.Strings.Set(PwDefs.NotesField, new ProtectedString(
- m_pwDatabase.MemoryProtection.ProtectNotes, lvi.SubItems[4].Text));
-
- string strCustom = lvi.SubItems[5].Text;
- if(strCustom.Length > 0)
- pe.Strings.Set(KPRes.Custom + " 1", new ProtectedString(false, strCustom));
-
- strCustom = lvi.SubItems[6].Text;
- if(strCustom.Length > 0)
- pe.Strings.Set(KPRes.Custom + " 2", new ProtectedString(false, strCustom));
-
- strCustom = lvi.SubItems[7].Text;
- if(strCustom.Length > 0)
- pe.Strings.Set(KPRes.Custom + " 3", new ProtectedString(false, strCustom));
- }
-
- m_pbRender.Value = 100;
- }
-
- private void OnBtnCancel(object sender, EventArgs e)
- {
- }
-
- private void UpdateStringSource()
- {
- string strEncoding = (m_cmbEncoding.Items[m_cmbEncoding.SelectedIndex] as string);
-
- Encoding enc = Encoding.Default;
- if(strEncoding == StrEncAscii) enc = Encoding.ASCII;
- else if(strEncoding == StrEncUtf7) enc = Encoding.UTF7;
- else if(strEncoding == StrEncUtf8) enc = Encoding.UTF8;
- else if(strEncoding == StrEncUtf32) enc = Encoding.UTF32;
- else if(strEncoding == StrEncUnicode) enc = Encoding.Unicode;
- else if(strEncoding == StrEncBigUnicode) enc = Encoding.BigEndianUnicode;
- else { Debug.Assert(strEncoding == KPRes.EncodingAnsi); }
-
- try
- {
- MemoryStream ms = new MemoryStream(m_pbInData, false);
- StreamReader sr = new StreamReader(ms, enc);
- m_strSource = sr.ReadToEnd();
- sr.Close();
- ms.Close();
- }
- catch(Exception) { m_strSource = KPRes.EncodingFail; }
-
- m_tbSourcePreview.Text = string.Empty;
- m_tbSourcePreview.Text = m_strSource;
- }
-
- private void UpdatePreview()
- {
- m_lvPreview.Items.Clear();
- // m_lvPreview.BeginUpdate();
-
- string strDelimiter = m_tbSepChar.Text;
- if(strDelimiter.Length == 0) return;
-
- char[] vPartTrimChars = new char[] { '\"' };
- int nLine = 0;
- string[] vLines = m_strSource.Split(new char[] { '\r', '\n' });
- foreach(string strLine in vLines)
- {
- m_pbRender.Value = (100 * nLine) / vLines.Length;
- ++nLine;
-
- if((strLine == null) || (strLine.Length == 0)) continue;
-
- List<string> vParts = ImportUtil.SplitCsvLine(strLine, strDelimiter);
-
- for(int i = 0; i < vParts.Count; ++i)
- vParts[i] = vParts[i].Trim(vPartTrimChars);
-
- ListViewItem lvi = new ListViewItem(string.Empty);
-
- lvi.Text = SafeListIndex(vParts, m_lvHeaderOrder.Columns[0].DisplayIndex);
- lvi.SubItems.Add(SafeListIndex(vParts, m_lvHeaderOrder.Columns[1].DisplayIndex));
- lvi.SubItems.Add(SafeListIndex(vParts, m_lvHeaderOrder.Columns[2].DisplayIndex));
- lvi.SubItems.Add(SafeListIndex(vParts, m_lvHeaderOrder.Columns[3].DisplayIndex));
- lvi.SubItems.Add(SafeListIndex(vParts, m_lvHeaderOrder.Columns[4].DisplayIndex));
- lvi.SubItems.Add(SafeListIndex(vParts, m_lvHeaderOrder.Columns[5].DisplayIndex));
- lvi.SubItems.Add(SafeListIndex(vParts, m_lvHeaderOrder.Columns[6].DisplayIndex));
- lvi.SubItems.Add(SafeListIndex(vParts, m_lvHeaderOrder.Columns[7].DisplayIndex));
-
- m_lvPreview.Items.Add(lvi);
- }
-
- m_pbRender.Value = 100;
- // m_lvPreview.EndUpdate();
- }
-
- private static string SafeListIndex(List<string> vList, int nIndex)
- {
- if(nIndex >= vList.Count) return string.Empty;
- return vList[nIndex];
- }
-
- private void OnCmbEncodingSelectedIndexChanged(object sender, EventArgs e)
- {
- if(m_bBlockChangedEvent) return;
-
- UpdateStringSource();
- UpdatePreview();
- }
-
- private void OnDelimiterTextChanged(object sender, EventArgs e)
- {
- if(m_bBlockChangedEvent) return;
-
- UpdatePreview();
- }
-
- private void OnDoubleQuoteCheckedChanged(object sender, EventArgs e)
- {
- if(m_bBlockChangedEvent) return;
-
- UpdatePreview();
- }
-
- private void OnBtnPreviewRefresh(object sender, EventArgs e)
- {
- UpdatePreview();
- }
-
- private void OnFormClosed(object sender, FormClosedEventArgs e)
- {
- GlobalWindowManager.RemoveWindow(this);
- }
- }
-}
\ No newline at end of file
diff --git a/Ext/DeprecatedSources/ImportCsvForm_120218.resx b/Ext/DeprecatedSources/ImportCsvForm_120218.resx
deleted file mode 100644
index ff31a6d..0000000
--- a/Ext/DeprecatedSources/ImportCsvForm_120218.resx
+++ /dev/null
@@ -1,120 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<root>
- <!--
- Microsoft ResX Schema
-
- Version 2.0
-
- The primary goals of this format is to allow a simple XML format
- that is mostly human readable. The generation and parsing of the
- various data types are done through the TypeConverter classes
- associated with the data types.
-
- Example:
-
- ... ado.net/XML headers & schema ...
- <resheader name="resmimetype">text/microsoft-resx</resheader>
- <resheader name="version">2.0</resheader>
- <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
- <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
- <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
- <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
- <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
- <value>[base64 mime encoded serialized .NET Framework object]</value>
- </data>
- <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
- <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
- <comment>This is a comment</comment>
- </data>
-
- There are any number of "resheader" rows that contain simple
- name/value pairs.
-
- Each data row contains a name, and value. The row also contains a
- type or mimetype. Type corresponds to a .NET class that support
- text/value conversion through the TypeConverter architecture.
- Classes that don't support this are serialized and stored with the
- mimetype set.
-
- The mimetype is used for serialized objects, and tells the
- ResXResourceReader how to depersist the object. This is currently not
- extensible. For a given mimetype the value must be set accordingly:
-
- Note - application/x-microsoft.net.object.binary.base64 is the format
- that the ResXResourceWriter will generate, however the reader can
- read any of the formats listed below.
-
- mimetype: application/x-microsoft.net.object.binary.base64
- value : The object must be serialized with
- : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
- : and then encoded with base64 encoding.
-
- mimetype: application/x-microsoft.net.object.soap.base64
- value : The object must be serialized with
- : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
- : and then encoded with base64 encoding.
-
- mimetype: application/x-microsoft.net.object.bytearray.base64
- value : The object must be serialized into a byte array
- : using a System.ComponentModel.TypeConverter
- : and then encoded with base64 encoding.
- -->
- <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
- <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
- <xsd:element name="root" msdata:IsDataSet="true">
- <xsd:complexType>
- <xsd:choice maxOccurs="unbounded">
- <xsd:element name="metadata">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" />
- </xsd:sequence>
- <xsd:attribute name="name" use="required" type="xsd:string" />
- <xsd:attribute name="type" type="xsd:string" />
- <xsd:attribute name="mimetype" type="xsd:string" />
- <xsd:attribute ref="xml:space" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="assembly">
- <xsd:complexType>
- <xsd:attribute name="alias" type="xsd:string" />
- <xsd:attribute name="name" type="xsd:string" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="data">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
- <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
- <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
- <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
- <xsd:attribute ref="xml:space" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="resheader">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" use="required" />
- </xsd:complexType>
- </xsd:element>
- </xsd:choice>
- </xsd:complexType>
- </xsd:element>
- </xsd:schema>
- <resheader name="resmimetype">
- <value>text/microsoft-resx</value>
- </resheader>
- <resheader name="version">
- <value>2.0</value>
- </resheader>
- <resheader name="reader">
- <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </resheader>
- <resheader name="writer">
- <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </resheader>
-</root>
\ No newline at end of file
diff --git a/Ext/DeprecatedSources/Kdb4File.Read.Dom.cs b/Ext/DeprecatedSources/Kdb4File.Read.Dom.cs
deleted file mode 100644
index 24b4cca..0000000
--- a/Ext/DeprecatedSources/Kdb4File.Read.Dom.cs
+++ /dev/null
@@ -1,680 +0,0 @@
-/*
- KeePass Password Safe - The Open-Source Password Manager
- Copyright (C) 2003-2010 Dominik Reichl <dominik.reichl at t-online.de>
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-*/
-
-using System;
-using System.Collections.Generic;
-using System.Text;
-using System.Security;
-using System.Security.Cryptography;
-using System.Drawing;
-using System.Xml;
-using System.IO;
-using System.Diagnostics;
-
-using KeePassLib;
-using KeePassLib.Collections;
-using KeePassLib.Cryptography;
-using KeePassLib.Cryptography.Cipher;
-using KeePassLib.Interfaces;
-using KeePassLib.Security;
-using KeePassLib.Utility;
-
-namespace KeePassLib.Serialization
-{
- public sealed partial class Kdb4File
- {
- /*
- private void ReadXmlDom(Stream readerStream)
- {
- XmlDocument doc = new XmlDocument();
- doc.Load(readerStream);
-
- XmlElement el = doc.DocumentElement;
- ReadDocument(el);
- }
-
- private void ReadDocument(XmlNode xmlRootNode)
- {
- Debug.Assert(xmlRootNode != null);
- if(xmlRootNode == null) throw new ArgumentNullException("xmlRootNode");
- if(xmlRootNode.Name != ElemDocNode) throw new XmlException("xmlRootNode");
-
- foreach(XmlNode xmlChild in xmlRootNode.ChildNodes)
- {
- string strNodeName = xmlChild.Name;
-
- if(strNodeName == ElemMeta) ReadMeta(xmlChild);
- else if(strNodeName == ElemRoot) ReadRoot(xmlChild);
- else ReadUnknown(xmlChild);
- }
- }
- */
-
- private void ReadUnknown(XmlNode xmlNode)
- {
- ProcessNode(xmlNode);
-
- // if(m_slLogger != null)
- // m_slLogger.SetText("Unknown field: " + xmlNode.Name, LogStatusType.Warning);
-
- foreach(XmlNode xmlChild in xmlNode.ChildNodes)
- ReadUnknown(xmlChild);
- }
-
- private XorredBuffer ProcessNode(XmlNode xmlNode)
- {
- Debug.Assert(xmlNode != null);
- if(xmlNode == null) throw new ArgumentNullException("xmlNode");
-
- XmlAttributeCollection xac = xmlNode.Attributes;
- if(xac == null) return null;
-
- XmlNode xmlProtected = xac.GetNamedItem(AttrProtected);
- if(xmlProtected != null)
- {
- if(xmlProtected.Value == ValTrue)
- {
- string strInner = xmlNode.InnerText;
-
- byte[] pbEncrypted;
- if(strInner.Length > 0)
- pbEncrypted = Convert.FromBase64String(strInner);
- else pbEncrypted = new byte[0];
-
- byte[] pbPad = m_randomStream.GetRandomBytes((uint)pbEncrypted.Length);
-
- return new XorredBuffer(pbEncrypted, pbPad);
- }
- }
-
- return null;
- }
-
- /*
- private void ReadMeta(XmlNode xmlNode)
- {
- ProcessNode(xmlNode);
-
- foreach(XmlNode xmlChild in xmlNode.ChildNodes)
- {
- string strName = xmlChild.Name;
-
- if(strName == ElemGenerator) { } // Ignore
- else if(strName == ElemDbName)
- m_pwDatabase.Name = ReadString(xmlChild);
- else if(strName == ElemDbNameChanged)
- m_pwDatabase.NameChanged = ReadTime(xmlChild);
- else if(strName == ElemDbDesc)
- m_pwDatabase.Description = ReadString(xmlChild);
- else if(strName == ElemDbDescChanged)
- m_pwDatabase.DescriptionChanged = ReadTime(xmlChild);
- else if(strName == ElemDbDefaultUser)
- m_pwDatabase.DefaultUserName = ReadString(xmlChild);
- else if(strName == ElemDbDefaultUserChanged)
- m_pwDatabase.DefaultUserNameChanged = ReadTime(xmlChild);
- else if(strName == ElemDbMntncHistoryDays)
- m_pwDatabase.MaintenanceHistoryDays = ReadUInt(xmlChild, 365);
- else if(strName == ElemDbKeyChanged)
- m_pwDatabase.MasterKeyChanged = ReadTime(xmlChild);
- else if(strName == ElemDbKeyChangeRec)
- m_pwDatabase.MasterKeyChangeRec = ReadLong(xmlChild, -1);
- else if(strName == ElemDbKeyChangeForce)
- m_pwDatabase.MasterKeyChangeForce = ReadLong(xmlChild, -1);
- else if(strName == ElemMemoryProt)
- ReadMemoryProtection(xmlChild);
- else if(strName == ElemCustomIcons)
- ReadCustomIcons(xmlChild);
- else if(strName == ElemRecycleBinEnabled)
- m_pwDatabase.RecycleBinEnabled = ReadBool(xmlChild, true);
- else if(strName == ElemRecycleBinUuid)
- m_pwDatabase.RecycleBinUuid = ReadUuid(xmlChild);
- else if(strName == ElemRecycleBinChanged)
- m_pwDatabase.RecycleBinChanged = ReadTime(xmlChild);
- else if(strName == ElemEntryTemplatesGroup)
- m_pwDatabase.EntryTemplatesGroup = ReadUuid(xmlChild);
- else if(strName == ElemEntryTemplatesGroupChanged)
- m_pwDatabase.EntryTemplatesGroupChanged = ReadTime(xmlChild);
- else if(strName == ElemLastSelectedGroup)
- m_pwDatabase.LastSelectedGroup = ReadUuid(xmlChild);
- else if(strName == ElemLastTopVisibleGroup)
- m_pwDatabase.LastTopVisibleGroup = ReadUuid(xmlChild);
- else if(strName == ElemCustomData)
- ReadStringDictEx(xmlChild, m_pwDatabase.CustomData);
- else ReadUnknown(xmlChild);
- }
- }
-
- private void ReadMemoryProtection(XmlNode xmlNode)
- {
- ProcessNode(xmlNode);
-
- foreach(XmlNode xmlChild in xmlNode.ChildNodes)
- {
- string strName = xmlChild.Name;
-
- if(strName == ElemProtTitle)
- m_pwDatabase.MemoryProtection.ProtectTitle = ReadBool(xmlChild, false);
- else if(strName == ElemProtUserName)
- m_pwDatabase.MemoryProtection.ProtectUserName = ReadBool(xmlChild, false);
- else if(strName == ElemProtPassword)
- m_pwDatabase.MemoryProtection.ProtectPassword = ReadBool(xmlChild, true);
- else if(strName == ElemProtUrl)
- m_pwDatabase.MemoryProtection.ProtectUrl = ReadBool(xmlChild, false);
- else if(strName == ElemProtNotes)
- m_pwDatabase.MemoryProtection.ProtectNotes = ReadBool(xmlChild, false);
- // else if(strName == ElemProtAutoHide)
- // m_pwDatabase.MemoryProtection.AutoEnableVisualHiding = ReadBool(xmlChild, true);
- else ReadUnknown(xmlChild);
- }
- }
-
- private void ReadCustomIcons(XmlNode xmlNode)
- {
- ProcessNode(xmlNode);
-
- foreach(XmlNode xmlChild in xmlNode.ChildNodes)
- {
- string strName = xmlChild.Name;
-
- if(strName == ElemCustomIconItem)
- ReadCustomIcon(xmlChild);
- else ReadUnknown(xmlChild);
- }
- }
-
- private void ReadCustomIcon(XmlNode xmlNode)
- {
- ProcessNode(xmlNode);
-
- PwUuid uuid = PwUuid.Zero;
- byte[] pbImageData = null;
-
- foreach(XmlNode xmlChild in xmlNode.ChildNodes)
- {
- string strName = xmlChild.Name;
-
- if(strName == ElemCustomIconItemID)
- uuid = ReadUuid(xmlChild);
- else if(strName == ElemCustomIconItemData)
- {
- string str = ReadString(xmlChild);
-
- if((str != null) && (str.Length > 0))
- pbImageData = Convert.FromBase64String(str);
- else { Debug.Assert(false); }
- }
- else ReadUnknown(xmlChild);
- }
-
- if((uuid != PwUuid.Zero) && (pbImageData != null))
- m_pwDatabase.CustomIcons.Add(new PwCustomIcon(uuid, pbImageData));
- else { Debug.Assert(false); }
- }
-
- private void ReadRoot(XmlNode xmlNode)
- {
- ProcessNode(xmlNode);
-
- bool bFoundDataGroup = false;
- foreach(XmlNode xmlChild in xmlNode.ChildNodes)
- {
- string strName = xmlChild.Name;
-
- if(strName == ElemGroup)
- {
- if(!bFoundDataGroup)
- {
- m_pwDatabase.RootGroup = ReadGroup(xmlChild);
- bFoundDataGroup = true;
- }
- else { Debug.Assert(false); ReadUnknown(xmlChild); }
- }
- else if(strName == ElemDeletedObjects)
- {
- ReadDeletedObjects(xmlChild, m_pwDatabase.DeletedObjects);
- }
- else ReadUnknown(xmlChild);
- }
-
- Debug.Assert(m_pwDatabase.RootGroup != null);
- Debug.Assert(m_pwDatabase.RootGroup.ParentGroup == null);
- }
-
- private PwGroup ReadGroup(XmlNode xmlNode)
- {
- ProcessNode(xmlNode);
-
- PwGroup pgStorage = new PwGroup(false, false);
-
- foreach(XmlNode xmlChild in xmlNode.ChildNodes)
- {
- string strName = xmlChild.Name;
-
- if(strName == ElemUuid) pgStorage.Uuid = ReadUuid(xmlChild);
- else if(strName == ElemName) pgStorage.Name = ReadString(xmlChild);
- else if(strName == ElemNotes) pgStorage.Notes = ReadString(xmlChild);
- else if(strName == ElemIcon) pgStorage.IconID = (PwIcon)ReadUInt(xmlChild, (uint)PwIcon.Key);
- else if(strName == ElemCustomIconID) pgStorage.CustomIconUuid = ReadUuid(xmlChild);
- else if(strName == ElemTimes) ReadTimes(xmlChild, pgStorage);
- else if(strName == ElemIsExpanded)
- pgStorage.IsExpanded = ReadBool(xmlChild, true);
- else if(strName == ElemGroupDefaultAutoTypeSeq)
- pgStorage.DefaultAutoTypeSequence = ReadString(xmlChild);
- else if(strName == ElemEnableAutoType)
- pgStorage.EnableAutoType = StrUtil.StringToBoolEx(ReadString(xmlChild));
- else if(strName == ElemEnableSearching)
- pgStorage.EnableSearching = StrUtil.StringToBoolEx(ReadString(xmlChild));
- else if(strName == ElemLastTopVisibleEntry)
- pgStorage.LastTopVisibleEntry = ReadUuid(xmlChild);
- else if(strName == ElemGroup)
- {
- PwGroup pgSub = ReadGroup(xmlChild);
- pgSub.ParentGroup = pgStorage;
- pgStorage.Groups.Add(pgSub);
- }
- else if(strName == ElemEntry)
- {
- PwEntry pe = ReadEntry(xmlChild);
- pgStorage.AddEntry(pe, true);
- }
- else ReadUnknown(xmlChild);
- }
-
- // Create new UUID if absent
- if(PwUuid.Zero.EqualsValue(pgStorage.Uuid))
- pgStorage.Uuid = new PwUuid(true); // No assert (import)
-
- return pgStorage;
- }
- */
-
- private PwEntry ReadEntry(XmlNode xmlNode)
- {
- ProcessNode(xmlNode);
-
- PwEntry pe = new PwEntry(false, false);
-
- Debug.Assert(Color.Empty.ToArgb() == 0);
-
- foreach(XmlNode xmlChild in xmlNode.ChildNodes)
- {
- string strName = xmlChild.Name;
-
- if(strName == ElemUuid) pe.Uuid = ReadUuid(xmlChild);
- else if(strName == ElemIcon)
- pe.IconId = (PwIcon)ReadUInt(xmlChild, (uint)PwIcon.Key);
- else if(strName == ElemCustomIconID)
- pe.CustomIconUuid = ReadUuid(xmlChild);
- else if(strName == ElemFgColor)
- {
- string strColor = ReadString(xmlChild);
- if((strColor != null) && (strColor.Length > 0))
- pe.ForegroundColor = ColorTranslator.FromHtml(strColor);
- }
- else if(strName == ElemBgColor)
- {
- string strColor = ReadString(xmlChild);
- if((strColor != null) && (strColor.Length > 0))
- pe.BackgroundColor = ColorTranslator.FromHtml(strColor);
- }
- else if(strName == ElemOverrideUrl)
- pe.OverrideUrl = ReadString(xmlChild);
- else if(strName == ElemTags)
- pe.Tags = StrUtil.StringToTags(ReadString(xmlChild));
- else if(strName == ElemTimes) ReadTimes(xmlChild, pe);
- else if(strName == ElemString) ReadProtectedStringEx(xmlChild, pe.Strings);
- else if(strName == ElemBinary) ReadProtectedBinaryEx(xmlChild, pe.Binaries);
- else if(strName == ElemAutoType) ReadAutoType(xmlChild, pe.AutoType);
- else if(strName == ElemHistory) ReadHistory(xmlChild, pe.History);
- else ReadUnknown(xmlChild);
- }
-
- // Create new UUID if absent
- if(PwUuid.Zero.EqualsValue(pe.Uuid))
- pe.Uuid = new PwUuid(true); // No assert (import)
-
- return pe;
- }
-
- private void ReadTimes(XmlNode xmlNode, ITimeLogger times)
- {
- ProcessNode(xmlNode);
-
- foreach(XmlNode xmlChild in xmlNode)
- {
- string strName = xmlChild.Name;
-
- if(strName == ElemLastModTime)
- times.LastModificationTime = ReadTime(xmlChild);
- else if(strName == ElemCreationTime)
- times.CreationTime = ReadTime(xmlChild);
- else if(strName == ElemLastAccessTime)
- times.LastAccessTime = ReadTime(xmlChild);
- else if(strName == ElemExpiryTime)
- times.ExpiryTime = ReadTime(xmlChild);
- else if(strName == ElemExpires)
- times.Expires = ReadBool(xmlChild, false);
- else if(strName == ElemUsageCount)
- times.UsageCount = ReadULong(xmlChild, 0);
- else if(strName == ElemLocationChanged)
- times.LocationChanged = ReadTime(xmlChild);
- else
- ReadUnknown(xmlChild);
- }
- }
-
- private string ReadString(XmlNode xmlNode)
- {
- ProcessNode(xmlNode);
-
- return xmlNode.InnerText;
- }
-
- private bool ReadBool(XmlNode xmlNode, bool bDefault)
- {
- ProcessNode(xmlNode);
-
- string str = xmlNode.InnerText;
- if(str == ValTrue) return true;
- else if(str == ValFalse) return false;
-
- Debug.Assert(false);
- return bDefault;
- }
-
- private PwUuid ReadUuid(XmlNode xmlNode)
- {
- ProcessNode(xmlNode);
-
- if(string.IsNullOrEmpty(xmlNode.InnerText)) return PwUuid.Zero;
- return new PwUuid(Convert.FromBase64String(xmlNode.InnerText));
- }
-
- private uint ReadUInt(XmlNode xmlNode, uint uDefault)
- {
- ProcessNode(xmlNode);
-
- uint u;
- if(StrUtil.TryParseUInt(xmlNode.InnerText, out u)) return u;
-
- Debug.Assert(false);
- return uDefault;
- }
-
- /* private long ReadLong(XmlNode xmlNode, long nDefault)
- {
- ProcessNode(xmlNode);
-
- long n;
- if(StrUtil.TryParseLong(xmlNode.InnerText, out n)) return n;
-
- Debug.Assert(false);
- return nDefault;
- } */
-
- private ulong ReadULong(XmlNode xmlNode, ulong uDefault)
- {
- ProcessNode(xmlNode);
-
- ulong u;
- if(StrUtil.TryParseULong(xmlNode.InnerText, out u)) return u;
-
- Debug.Assert(false);
- return uDefault;
- }
-
- private DateTime ReadTime(XmlNode xmlNode)
- {
- ProcessNode(xmlNode);
-
- DateTime dt;
- if(TimeUtil.TryDeserializeUtc(xmlNode.InnerText, out dt)) return dt;
-
- Debug.Assert(false);
- return m_dtNow;
- }
-
- private void ReadProtectedStringEx(XmlNode xmlNode, ProtectedStringDictionary dictStorage)
- {
- ProcessNode(xmlNode);
-
- string strKey = string.Empty;
- XorredBuffer xbValue = null;
- string strValue = null;
-
- foreach(XmlNode xmlChild in xmlNode.ChildNodes)
- {
- if(xmlChild.Name == ElemKey)
- {
- ProcessNode(xmlChild);
- strKey = xmlChild.InnerText;
- }
- else if(xmlChild.Name == ElemValue)
- {
- xbValue = ProcessNode(xmlChild);
-
- // If contents aren't protected: read as plain-text string
- if(xbValue == null) strValue = xmlChild.InnerText;
- }
- else ReadUnknown(xmlChild);
- }
-
- if(xbValue != null)
- {
- Debug.Assert(strValue == null);
- dictStorage.Set(strKey, new ProtectedString(true, xbValue));
- }
- else
- {
- Debug.Assert(strValue != null);
- dictStorage.Set(strKey, new ProtectedString(false, strValue));
- }
-
-#if DEBUG
- if(m_format == Kdb4Format.Default)
- {
- if(strKey == PwDefs.TitleField)
- {
- Debug.Assert(m_pwDatabase.MemoryProtection.ProtectTitle ==
- dictStorage.Get(strKey).IsProtected);
- }
- else if(strKey == PwDefs.UserNameField)
- {
- Debug.Assert(m_pwDatabase.MemoryProtection.ProtectUserName ==
- dictStorage.Get(strKey).IsProtected);
- }
- else if(strKey == PwDefs.PasswordField)
- {
- Debug.Assert(m_pwDatabase.MemoryProtection.ProtectPassword ==
- dictStorage.Get(strKey).IsProtected);
- }
- else if(strKey == PwDefs.UrlField)
- {
- Debug.Assert(m_pwDatabase.MemoryProtection.ProtectUrl ==
- dictStorage.Get(strKey).IsProtected);
- }
- else if(strKey == PwDefs.NotesField)
- {
- Debug.Assert(m_pwDatabase.MemoryProtection.ProtectNotes ==
- dictStorage.Get(strKey).IsProtected);
- }
- }
-#endif
- }
-
- private void ReadProtectedBinaryEx(XmlNode xmlNode, ProtectedBinaryDictionary dictStorage)
- {
- ProcessNode(xmlNode);
-
- string strKey = string.Empty;
- XorredBuffer xbValue = null;
- byte[] pbValue = null;
-
- foreach(XmlNode xmlChild in xmlNode.ChildNodes)
- {
- if(xmlChild.Name == ElemKey)
- {
- ProcessNode(xmlChild);
- strKey = xmlChild.InnerText;
- }
- else if(xmlChild.Name == ElemValue)
- {
- xbValue = ProcessNode(xmlChild);
-
- if(xbValue == null)
- {
- string strInner = xmlChild.InnerText;
-
- if(strInner.Length > 0)
- pbValue = Convert.FromBase64String(strInner);
- else pbValue = new byte[0];
- }
- }
- else ReadUnknown(xmlChild);
- }
-
- if(xbValue != null)
- {
- Debug.Assert(pbValue == null);
- dictStorage.Set(strKey, new ProtectedBinary(true, xbValue));
- }
- else
- {
- Debug.Assert(pbValue != null);
- dictStorage.Set(strKey, new ProtectedBinary(false, pbValue));
- }
- }
-
- private void ReadAutoType(XmlNode xmlNode, AutoTypeConfig atConfig)
- {
- ProcessNode(xmlNode);
-
- foreach(XmlNode xmlChild in xmlNode.ChildNodes)
- {
- if(xmlChild.Name == ElemAutoTypeEnabled)
- atConfig.Enabled = ReadBool(xmlChild, true);
- else if(xmlChild.Name == ElemAutoTypeObfuscation)
- atConfig.ObfuscationOptions =
- (AutoTypeObfuscationOptions)ReadUInt(xmlChild, 0);
- else if(xmlChild.Name == ElemAutoTypeDefaultSeq)
- atConfig.DefaultSequence = ReadString(xmlChild);
- else if(xmlChild.Name == ElemAutoTypeItem)
- ReadAutoTypeItem(xmlChild, atConfig);
- else ReadUnknown(xmlChild);
- }
- }
-
- private void ReadAutoTypeItem(XmlNode xmlNode, AutoTypeConfig atStorage)
- {
- ProcessNode(xmlNode);
-
- string strWindow = string.Empty, strKeySeq = string.Empty;
-
- foreach(XmlNode xmlChild in xmlNode.ChildNodes)
- {
- if(xmlChild.Name == ElemWindow)
- strWindow = ReadString(xmlChild);
- else if(xmlChild.Name == ElemKeystrokeSequence)
- strKeySeq = ReadString(xmlChild);
- else ReadUnknown(xmlChild);
- }
-
- atStorage.Set(strWindow, strKeySeq);
- }
-
- /*
- private void ReadDeletedObjects(XmlNode xmlNode, PwObjectList<PwDeletedObject> list)
- {
- ProcessNode(xmlNode);
-
- foreach(XmlNode xmlChild in xmlNode.ChildNodes)
- {
- if(xmlChild.Name == ElemDeletedObject)
- list.Add(ReadDeletedObject(xmlChild));
- else ReadUnknown(xmlChild);
- }
- }
-
- private PwDeletedObject ReadDeletedObject(XmlNode xmlNode)
- {
- ProcessNode(xmlNode);
-
- PwDeletedObject pdo = new PwDeletedObject();
- foreach(XmlNode xmlChild in xmlNode.ChildNodes)
- {
- if(xmlChild.Name == ElemUuid)
- pdo.Uuid = ReadUuid(xmlChild);
- else if(xmlChild.Name == ElemDeletionTime)
- pdo.DeletionTime = ReadTime(xmlChild);
- else ReadUnknown(xmlChild);
- }
-
- return pdo;
- }
- */
-
- private void ReadHistory(XmlNode xmlNode, PwObjectList<PwEntry> plStorage)
- {
- ProcessNode(xmlNode);
-
- foreach(XmlNode xmlChild in xmlNode.ChildNodes)
- {
- if(xmlChild.Name == ElemEntry)
- {
- plStorage.Add(ReadEntry(xmlChild));
- }
- else ReadUnknown(xmlChild);
- }
- }
-
- /*
- private void ReadStringDictEx(XmlNode xmlNode, StringDictionaryEx sdStorage)
- {
- ProcessNode(xmlNode);
-
- foreach(XmlNode xmlChild in xmlNode.ChildNodes)
- {
- if(xmlChild.Name == ElemStringDictExItem)
- ReadStringDictExItem(xmlChild, sdStorage);
- else ReadUnknown(xmlChild);
- }
- }
-
- private void ReadStringDictExItem(XmlNode xmlNode, StringDictionaryEx sdStorage)
- {
- ProcessNode(xmlNode);
-
- string strName = null, strValue = null;
-
- foreach(XmlNode xmlChild in xmlNode.ChildNodes)
- {
- if(xmlChild.Name == ElemKey)
- strName = ReadString(xmlChild);
- else if(xmlChild.Name == ElemValue)
- strValue = ReadString(xmlChild);
- else ReadUnknown(xmlChild);
- }
-
- if((strName != null) && (strValue != null))
- m_pwDatabase.CustomData.Set(strName, strValue);
- else { Debug.Assert(false); }
- }
- */
- }
-}
diff --git a/Ext/DeprecatedSources/KeePassCsv1x_120221.cs b/Ext/DeprecatedSources/KeePassCsv1x_120221.cs
deleted file mode 100644
index 1cbde91..0000000
--- a/Ext/DeprecatedSources/KeePassCsv1x_120221.cs
+++ /dev/null
@@ -1,187 +0,0 @@
-/*
- KeePass Password Safe - The Open-Source Password Manager
- Copyright (C) 2003-2012 Dominik Reichl <dominik.reichl at t-online.de>
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-*/
-
-using System;
-using System.Collections.Generic;
-using System.Text;
-using System.Diagnostics;
-using System.Drawing;
-using System.IO;
-
-using KeePassLib;
-using KeePassLib.Delegates;
-using KeePassLib.Interfaces;
-using KeePassLib.Security;
-using KeePassLib.Utility;
-
-namespace KeePass.DataExchange.Formats
-{
- internal sealed class KeePassCsv1x : FileFormatProvider
- {
- public override bool SupportsImport { get { return true; } }
- public override bool SupportsExport { get { return true; } }
-
- public override string FormatName { get { return "KeePass CSV (1.x)"; } }
- public override string DefaultExtension { get { return "csv"; } }
- public override string ApplicationGroup { get { return PwDefs.ShortProductName; } }
-
- public override bool ImportAppendsToRootGroupOnly { get { return true; } }
-
- public override Image SmallIcon
- {
- get { return KeePass.Properties.Resources.B16x16_KeePass; }
- }
-
- public override void Import(PwDatabase pwStorage, Stream sInput,
- IStatusLogger slLogger)
- {
- StreamReader sr = new StreamReader(sInput, Encoding.UTF8);
- string strFileContents = sr.ReadToEnd();
- sr.Close();
-
- CharStream csSource = new CharStream(strFileContents);
-
- while(true)
- {
- if(ReadEntry(pwStorage, csSource) == false)
- break;
- }
- }
-
- private static bool ReadEntry(PwDatabase pwStorage, CharStream csSource)
- {
- PwEntry pe = new PwEntry(true, true);
-
- string strTitle = ReadCsvField(csSource);
- if(strTitle == null) return false; // No entry available
-
- string strUser = ReadCsvField(csSource);
- if(strUser == null) throw new InvalidDataException();
-
- string strPassword = ReadCsvField(csSource);
- if(strPassword == null) throw new InvalidDataException();
-
- string strUrl = ReadCsvField(csSource);
- if(strUrl == null) throw new InvalidDataException();
-
- string strNotes = ReadCsvField(csSource);
- if(strNotes == null) throw new InvalidDataException();
-
- if((strTitle == "Account") && (strUser == "Login Name") &&
- (strPassword == "Password") && (strUrl == "Web Site") &&
- (strNotes == "Comments"))
- {
- return true; // Ignore header entry
- }
-
- pe.Strings.Set(PwDefs.TitleField, new ProtectedString(
- pwStorage.MemoryProtection.ProtectTitle, strTitle));
- pe.Strings.Set(PwDefs.UserNameField, new ProtectedString(
- pwStorage.MemoryProtection.ProtectUserName, strUser));
- pe.Strings.Set(PwDefs.PasswordField, new ProtectedString(
- pwStorage.MemoryProtection.ProtectPassword, strPassword));
- pe.Strings.Set(PwDefs.UrlField, new ProtectedString(
- pwStorage.MemoryProtection.ProtectUrl, strUrl));
- pe.Strings.Set(PwDefs.NotesField, new ProtectedString(
- pwStorage.MemoryProtection.ProtectNotes, strNotes));
-
- pwStorage.RootGroup.AddEntry(pe, true);
- return true;
- }
-
- private static string ReadCsvField(CharStream csSource)
- {
- StringBuilder sb = new StringBuilder();
- bool bInField = false;
-
- while(true)
- {
- char ch = csSource.ReadChar();
- if(ch == char.MinValue)
- return null;
-
- if((ch == '\"') && !bInField)
- bInField = true;
- else if((ch == '\"') && bInField)
- break;
- else if(ch == '\\')
- {
- char chSub = csSource.ReadChar();
- if(chSub == char.MinValue)
- throw new InvalidDataException();
-
- sb.Append(chSub);
- }
- else if(bInField)
- sb.Append(ch);
- }
-
- return sb.ToString();
- }
-
- public override bool Export(PwExportInfo pwExportInfo, Stream sOutput,
- IStatusLogger slLogger)
- {
- PwGroup pg = (pwExportInfo.DataGroup ?? ((pwExportInfo.ContextDatabase !=
- null) ? pwExportInfo.ContextDatabase.RootGroup : null));
-
- StreamWriter sw = new StreamWriter(sOutput, new UTF8Encoding(false));
- sw.Write("\"Account\",\"Login Name\",\"Password\",\"Web Site\",\"Comments\"\r\n");
-
- EntryHandler eh = delegate(PwEntry pe)
- {
- WriteCsvEntry(sw, pe);
- return true;
- };
-
- if(pg != null) pg.TraverseTree(TraversalMethod.PreOrder, null, eh);
-
- sw.Close();
- return true;
- }
-
- private static void WriteCsvEntry(StreamWriter sw, PwEntry pe)
- {
- if(sw == null) { Debug.Assert(false); return; }
- if(pe == null) { Debug.Assert(false); return; }
-
- const string strSep = "\",\"";
-
- sw.Write("\"");
- WriteCsvString(sw, pe.Strings.ReadSafe(PwDefs.TitleField), strSep);
- WriteCsvString(sw, pe.Strings.ReadSafe(PwDefs.UserNameField), strSep);
- WriteCsvString(sw, pe.Strings.ReadSafe(PwDefs.PasswordField), strSep);
- WriteCsvString(sw, pe.Strings.ReadSafe(PwDefs.UrlField), strSep);
- WriteCsvString(sw, pe.Strings.ReadSafe(PwDefs.NotesField), "\"\r\n");
- }
-
- private static void WriteCsvString(StreamWriter sw, string strText,
- string strAppend)
- {
- string str = strText;
-
- str = str.Replace("\\", "\\\\");
- str = str.Replace("\"", "\\\"");
-
- sw.Write(str);
-
- if((strAppend != null) && (strAppend.Length > 0)) sw.Write(strAppend);
- }
- }
-}
diff --git a/Ext/DeprecatedSources/MainForm_110830.txt b/Ext/DeprecatedSources/MainForm_110830.txt
deleted file mode 100644
index 7221fdf..0000000
--- a/Ext/DeprecatedSources/MainForm_110830.txt
+++ /dev/null
@@ -1,66 +0,0 @@
- /* public void RefreshEntriesList()
- {
- int nItemCount = m_lvEntries.Items.Count;
- if(nItemCount <= 0) return;
-
- PwEntry peTop = GetTopEntry();
- PwEntry peFocused = GetSelectedEntry(false);
- int iScrollY = NativeMethods.GetScrollPosY(m_lvEntries.Handle);
-
- UpdateImageLists(); // Important
-
- PwEntry[] vSelected = GetSelectedEntries();
- if(vSelected == null) vSelected = new PwEntry[0];
-
- PwEntry[] vList = new PwEntry[nItemCount];
- for(int iEnum = 0; iEnum < nItemCount; ++iEnum)
- vList[iEnum] = (PwEntry)m_lvEntries.Items[iEnum].Tag;
-
- m_lvEntries.BeginUpdate();
- m_lvEntries.Items.Clear();
- m_lvEntries.Groups.Clear();
- m_lvgLastEntryGroup = null;
-
- int nTopIndex = -1;
- ListViewItem lviFocused = null;
-
- m_dtCachedNow = DateTime.Now;
- ListViewStateEx lvseCachedState = new ListViewStateEx(m_lvEntries);
-
- for(int iAdd = 0; iAdd < nItemCount; ++iAdd)
- {
- PwEntry pe = vList[iAdd];
-
- ListViewItem lvi = SetListEntry(pe, null);
-
- if(pe == peTop) nTopIndex = iAdd;
- if(pe == peFocused) lviFocused = lvi;
-
- if(Array.IndexOf(vSelected, pe) >= 0) lvi.Selected = true;
- }
-
- Debug.Assert(lvseCachedState.CompareTo(m_lvEntries));
-
- UIUtil.SetAlternatingBgColors(m_lvEntries, m_clrAlternateItemBgColor,
- Program.Config.MainWindow.EntryListAlternatingBgColors);
-
- Debug.Assert(m_bEntryGrouping == m_lvEntries.ShowGroups);
- if(m_lvEntries.ShowGroups)
- {
- // Test nTopIndex to ensure we're not scrolling an unrelated list
- if((nTopIndex >= 0) && (iScrollY > 0))
- NativeMethods.Scroll(m_lvEntries, 0, iScrollY);
- }
- else
- {
- if(nTopIndex >= 0)
- {
- m_lvEntries.EnsureVisible(m_lvEntries.Items.Count - 1);
- m_lvEntries.EnsureVisible(nTopIndex);
- }
- }
-
- if(lviFocused != null) m_lvEntries.FocusedItem = lviFocused;
-
- m_lvEntries.EndUpdate();
- } */
diff --git a/Ext/DeprecatedSources/PasswordListPrintDocument_110101.cs b/Ext/DeprecatedSources/PasswordListPrintDocument_110101.cs
deleted file mode 100644
index fe1b7c4..0000000
--- a/Ext/DeprecatedSources/PasswordListPrintDocument_110101.cs
+++ /dev/null
@@ -1,165 +0,0 @@
-/*
- KeePass Password Safe - The Open-Source Password Manager
- Copyright (C) 2003-2011 Dominik Reichl <dominik.reichl at t-online.de>
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-*/
-
-/*
-using System;
-using System.Collections.Generic;
-using System.Text;
-using System.Drawing;
-using System.Drawing.Printing;
-using System.Windows.Forms;
-using System.Diagnostics;
-
-using KeePassLib;
-using KeePassLib.Delegates;
-using KeePassLib.Security;
-
-namespace KeePass.UI
-{
- internal sealed class PasswordListLine
- {
- public PwIcon IconID = PwIcon.None;
- public PwUuid CustomIcon = null;
- public List<string> TextFields = new List<string>();
- }
-
- public sealed class PasswordListPrintDocument : PrintDocument
- {
- private PwGroup m_pgDataSource = null;
-
- private Font m_fontNormal = null;
- private Font m_fontPassword = null;
-
- private List<PasswordListLine> m_vLines = new List<PasswordListLine>();
- private int m_nCurrentLine = 0;
-
- public PasswordListPrintDocument(PwGroup pgDataSource)
- {
- Debug.Assert(pgDataSource != null);
- if(pgDataSource == null) throw new ArgumentNullException("pgDataSource");
-
- m_pgDataSource = pgDataSource;
- }
-
- private void DisposePrinterFont(ref Font f)
- {
- if(f != null)
- {
- f.Dispose();
- f = null;
- }
- }
-
- protected override void OnBeginPrint(PrintEventArgs e)
- {
- base.OnBeginPrint(e);
-
- RenderDocument(e);
-
- m_fontNormal = new Font(FontFamily.GenericSansSerif, 10.0f);
- m_fontPassword = new Font(FontFamily.GenericMonospace, 10.0f);
- }
-
- protected override void OnEndPrint(PrintEventArgs e)
- {
- base.OnEndPrint(e);
-
- DisposePrinterFont(ref m_fontNormal);
- DisposePrinterFont(ref m_fontPassword);
- }
-
- protected override void OnPrintPage(PrintPageEventArgs e)
- {
- base.OnPrintPage(e);
-
- Graphics g = e.Graphics;
-
- float fLeft = e.MarginBounds.Left;
- float fRight = e.MarginBounds.Right;
- float fTop = e.MarginBounds.Top;
- float fBottom = e.MarginBounds.Bottom;
- float fWidth = fRight - fLeft;
-
- string strTestText = @"WJygpqQIL|°";
- float fNormalHeight = TextRenderer.MeasureText(g, strTestText,
- m_fontNormal).Height;
- float fPasswordHeight = TextRenderer.MeasureText(g, strTestText,
- m_fontPassword).Height;
-
- float fLineHeight = Math.Max(fNormalHeight, fPasswordHeight);
-
- float fCurrentY = fTop;
-
- while(true)
- {
- if((fCurrentY + fLineHeight) >= fBottom)
- break;
-
- PasswordListLine pll = m_vLines[m_nCurrentLine];
- int nTextCount = pll.TextFields.Count;
-
- for(int iField = 0; iField < nTextCount; ++iField)
- {
- PointF ptText = new PointF((fWidth * iField) / nTextCount,
- fCurrentY);
-
- g.DrawString(pll.TextFields[iField], m_fontNormal,
- Brushes.Black, ptText);
- }
-
- fCurrentY += fLineHeight;
-
- ++m_nCurrentLine;
- if(m_nCurrentLine == m_vLines.Count) break;
- }
-
- e.HasMorePages = (m_nCurrentLine != m_vLines.Count);
- }
-
- private void RenderDocument(PrintEventArgs e)
- {
- m_vLines.Clear();
- m_nCurrentLine = 0;
-
- GroupHandler gh = delegate(PwGroup pg)
- {
- return true;
- };
-
- EntryHandler eh = delegate(PwEntry pe)
- {
- PasswordListLine pll = new PasswordListLine();
-
- pll.IconID = pe.IconID;
- pll.CustomIcon = pe.CustomIconUuid;
- pll.TextFields.Add(pe.Strings.ReadSafe(PwDefs.TitleField));
- pll.TextFields.Add(pe.Strings.ReadSafe(PwDefs.UserNameField));
- pll.TextFields.Add(pe.Strings.ReadSafe(PwDefs.PasswordField));
- pll.TextFields.Add(pe.Strings.ReadSafe(PwDefs.UrlField));
- pll.TextFields.Add(pe.Strings.ReadSafe(PwDefs.NotesField));
-
- m_vLines.Add(pll);
- return true;
- };
-
- m_pgDataSource.TraverseTree(TraversalMethod.PreOrder, gh, eh);
- }
- }
-}
-*/
diff --git a/Ext/DeprecatedSources/PopularPasswords_100725.cs b/Ext/DeprecatedSources/PopularPasswords_100725.cs
deleted file mode 100644
index ed8cf57..0000000
--- a/Ext/DeprecatedSources/PopularPasswords_100725.cs
+++ /dev/null
@@ -1,369 +0,0 @@
-/*
- KeePass Password Safe - The Open-Source Password Manager
- Copyright (C) 2003-2010 Dominik Reichl <dominik.reichl at t-online.de>
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-*/
-
-using System;
-using System.Collections.Generic;
-using System.Text;
-using System.IO;
-using System.Security.Cryptography;
-using System.Globalization;
-using System.Diagnostics;
-
-using KeePassLib.Utility;
-
-namespace KeePassLib.Cryptography
-{
- /// <summary>
- /// Bloom filter-based popular password checking.
- /// </summary>
- public static class PopularPasswords
- {
- private const int PpcTableSize = 4096 * 8; // Bits, multiple of 64
-
- // Bits set: 15719 of 32768
- // Hash functions: 16
- // Phi (bits unset ratio) estimation: 0.520486428116307
- // Exact Phi: 0.520294189453125
- // False positives ratio: 7.86320618801785E-06
- private static readonly ulong[] PpcTable = {
- 0xE4489A3404344788UL, 0x86B25DB476F58AB7UL, 0xB581FAA53EA2342AUL,
- 0x70B2C54E1E6762D0UL, 0x1AEEB1A9DF75C01BUL, 0xEE2B0C368A1FE6DAUL,
- 0x02DC8D0E5CD9FC17UL, 0x6A449E23057C6560UL, 0x889E159F16E9681DUL,
- 0x2686144C0927486FUL, 0x6C4AF58039D4E4D0UL, 0xC5AB193CD0077707UL,
- 0x32399D528F7E1F07UL, 0xD6396059B4C04626UL, 0x0E0AF217323143B5UL,
- 0x5BD81DA44A6EC64BUL, 0xC2B7AF8E93C4D482UL, 0x92E221F8F7D6F708UL,
- 0x91E9933F20E90825UL, 0x5D0AD3B4F81061E3UL, 0x06101FFA010464E7UL,
- 0xB10F259524E1BEAAUL, 0x81191B0D13812121UL, 0x2CBEF0BAE5896DA0UL,
- 0x4187F900F4B164F8UL, 0x6362BB64B8507748UL, 0x3A622549FE71D89DUL,
- 0x052819709952C6CFUL, 0x58EBFBDEACA4D82EUL, 0x2AA0001D0A33CCA0UL,
- 0x19EF6C2C114DDC21UL, 0x937F5B504AE709F0UL, 0xD0CD4487EA84F479UL,
- 0x169CA49DB21A1338UL, 0x307EF1001D232212UL, 0xB1A42ECB6F61051EUL,
- 0x98E28AD44EA4D8F0UL, 0x65820520E5FC0830UL, 0xC231BE1D6054AAD5UL,
- 0x3E61CEADDA6AD3A9UL, 0xCE1AA54066469E83UL, 0x3DE3666FB5653C57UL,
- 0x39D894D5C6310CA5UL, 0x39CB8A2D5A49CB02UL, 0xDEC88143040007E7UL,
- 0x371BFD3E22C20F6DUL, 0x93E1697B64CD8C89UL, 0x67CB5B14CC3ED9EDUL,
- 0x6D10DA90332239D6UL, 0x6673DD254CD82162UL, 0x24089D15A893BB0FUL,
- 0xEA4D11D96C16A203UL, 0xF70176A0E28539A8UL, 0x0DE6B18BA8966C86UL,
- 0x856FC8659A6E9D7FUL, 0x7B726A5A2A6DE203UL, 0x0CFBC2911CB2CE63UL,
- 0x6363D417490A0256UL, 0x541A26883DF51A45UL, 0xB37BE5AF83DA3AD1UL,
- 0xE7B834E9000CA060UL, 0x841B2F8473222666UL, 0xE16CCFE7029B7E5EUL,
- 0x3C08D6AABC226AC9UL, 0x0887968C7690498FUL, 0x3B12659FAC807598UL,
- 0xD886F0364EC34407UL, 0x1B31A94B51E024F5UL, 0xC492A4F451800A11UL,
- 0x6D89165B69494B89UL, 0x5B183AFD7A22D9B5UL, 0xCDFF381022100872UL,
- 0xD29D38A72690562BUL, 0xEFBEE452E0B08682UL, 0x79D755AD7BC57506UL,
- 0x38C5372ED560B720UL, 0xB42B16AA623D0378UL, 0x5166ECA60CC145F7UL,
- 0x415C4A83F53FA99EUL, 0x3CA25AC6937A92F2UL, 0xDDEE63E44F2B5C9CUL,
- 0x580EE47F5FC58ABAUL, 0x7AA9763C6E7BBBD5UL, 0x80420F1F81FBF086UL,
- 0xC882A993C8A6AAA0UL, 0x2AE686154F8B3C1AUL, 0x30FE1DA4CA7C74EDUL,
- 0x6062AD6F3A825452UL, 0xC53E126449486920UL, 0x9C02CADB149D340CUL,
- 0x640F66F165EB961DUL, 0xAC20B871E28D20D6UL, 0x208E878696510DE9UL,
- 0x0E9526E74040EE6CUL, 0x39AF5257605AF29EUL, 0x9E0B4A4F372E14ACUL,
- 0x74143CD2D734F14DUL, 0x426496359E685811UL, 0x7B63BF2DB9B343C6UL,
- 0xB3B40017B49BC96BUL, 0x4BE5B132E6AD8F35UL, 0x0CBDF68541C060F2UL,
- 0x5D822A6CF8548376UL, 0xADC77581F25106E4UL, 0x4E91EC63FE2E5847UL,
- 0x95167F55FC249D81UL, 0xD4D8F7E04A9F1845UL, 0xD4B55F3F350F10DEUL,
- 0x310E105A026E91F8UL, 0xA1DF7398366C1398UL, 0x19D187ADC6C2C26DUL,
- 0x1A20235761A2ED08UL, 0xA0B65B813345E3FCUL, 0x208EDBEA6828239FUL,
- 0x6745B0810E0DC190UL, 0xDB09F52112896186UL, 0xAAFD7E27B0760AC0UL,
- 0x7081DDCC1AEF30F3UL, 0x12744B39E6A8A1E8UL, 0x59A0166D773C5BE4UL,
- 0x25426A44E348A784UL, 0x2F117FAF2464B3EFUL, 0x07DE883BA546C9F0UL,
- 0x81260E8469A42391UL, 0x7528100996040644UL, 0xB20E1E42F1601FAEUL,
- 0x68C9A1A96C5D7002UL, 0x3AE9934E86D51BADUL, 0xCF095403DAC63ED5UL,
- 0xAB6F755ECB8064C8UL, 0x8480C7D61D55829FUL, 0x1E7A383A70CBFA6FUL,
- 0x2ED63359316544BAUL, 0x4ACCC761760FC489UL, 0x9B668054F469AE2DUL,
- 0xCA231AB3FE49327BUL, 0x9164054162F1567BUL, 0x0E276E3BC1FA10AEUL,
- 0xB47E34300405D7EFUL, 0xA50FD0B6BF67C75FUL, 0x62BCA28A13A5C2B9UL,
- 0x9884F6008C2AE25BUL, 0x80F0D9722D30215CUL, 0xF702F1093AA6AD69UL,
- 0x11ECD08A62B902ACUL, 0x32EADD0519A8F117UL, 0x784E07D4E2026220UL,
- 0x3803CAC2CDDC9FCDUL, 0x9F55A4559CF9FBCAUL, 0xB64A7C5991550497UL,
- 0x632DEF7CE48765A1UL, 0xB7EEC58454987009UL, 0xB798651B5C588074UL,
- 0xCF177657608C684FUL, 0x09B886763311529FUL, 0x13279B25F38E9078UL,
- 0x4494804869BB8200UL, 0xF3316EF9A5693494UL, 0x6E0DA3E544E21ED9UL,
- 0x087F84F0538BD741UL, 0xBC877CCA688983C5UL, 0xF733E7057A2661B4UL,
- 0xB503AD77C9E83B23UL, 0x8FB6B2560FCAE443UL, 0xC10E770A2389C1F4UL,
- 0x4BBEE81101789902UL, 0xCF28D640F2C4EE03UL, 0xB5FA56647A0D246EUL,
- 0xE0E13635CC3A003CUL, 0xAF321B876375B0E0UL, 0x5CC1F60F2CEC1947UL,
- 0x6D79F85C6C3E2178UL, 0x8C5105F188F59F48UL, 0xF026E4771132D495UL,
- 0x68806C37457C8A11UL, 0xAC4FCFE08FF935E9UL, 0x02C9ED0DE36DEAD0UL,
- 0x736E789114C176C0UL, 0x018484BB3F90C627UL, 0xADE11EBC06679C81UL,
- 0xDC12310CF4646120UL, 0x565939720A871E91UL, 0x5129FA305D5F80D8UL,
- 0x2F1978C44B222F66UL, 0xB2019E9C3C9223A3UL, 0xC26E8310561ABA8BUL,
- 0x4C3268947F138A08UL, 0x1B10F12838C2F672UL, 0x3DD765F24A8EAD63UL,
- 0xAC255685D091756CUL, 0x1EE8F33DAB66696EUL, 0xDCC69A9317A640E4UL,
- 0xB3E10F8B1451577BUL, 0x9C989C1D83694926UL, 0x76C223945AE55AC5UL,
- 0x3A5B5A5BA089C4F4UL, 0x5FF9863504F6D63AUL, 0x2BA33660EBC2D7B2UL,
- 0xA90E90345E800C21UL, 0xE5C1C600199418DFUL, 0xB05541ED4A60E891UL,
- 0xA79B38C035129539UL, 0x101AE63623F00D19UL, 0x86AEF221B04AE1E6UL,
- 0x2D5FB8BDF5DD4537UL, 0xCF57F9D3F420CD52UL, 0x41FAB56E1CBEDE7DUL,
- 0x4E31A70953DE2053UL, 0xB697E044F555FB02UL, 0x9E32B905F6B54765UL,
- 0x0EE565A5E3C49262UL, 0x0E2BEB43000C0363UL, 0xBABF2096A749073FUL,
- 0xDE0C27F78E1B89D9UL, 0x14878D174A34D220UL, 0x49189778D3782CF7UL,
- 0xC4E37E8E0AFBE8FFUL, 0x0553DB16D17599F3UL, 0xE5324CCC7E3DFAF6UL,
- 0x1002D714B914D3E3UL, 0x2C8C0DF862CF9D90UL, 0x552817B44DFF5733UL,
- 0xD343B93EE79DA789UL, 0x5B70BB23756C998AUL, 0xB4E79BF903F1B28EUL,
- 0xFEC69776A1728BC1UL, 0x3B3481B27815701CUL, 0x8028717CB8AB7835UL,
- 0x15C681958C8DAE00UL, 0x44D5CEAEF0A1563CUL, 0x6BB90C05209F1A8EUL,
- 0x1323A9FA431DC10DUL, 0x50C7BFFE3DB35371UL, 0x613D8488D33B6D4FUL,
- 0x6C300351CF14A712UL, 0xD451A406E06F92D2UL, 0x9D48DC26ABA018B3UL,
- 0x1F4573A97CA5FDBAUL, 0x6E65AE090F50F2FBUL, 0x1EBA1E084584BFB3UL,
- 0x58BC501FBF7AC020UL, 0x0CF6120722B5D600UL, 0x4ABC91E6DC5000EEUL,
- 0x9CBD9C3911614606UL, 0x0BDC8E1A1650977FUL, 0x90383FB6559BCB49UL,
- 0x42B98DA163D4411DUL, 0x1C4582B0DBE9F911UL, 0x372C888720E79B05UL,
- 0x906560A343786D02UL, 0x9E233DF7175BD4FEUL, 0x4EB66BA91A9C41BFUL,
- 0x41FDB3460AC6F231UL, 0x79DB680FA3BA9330UL, 0x5A541224CD43333DUL,
- 0x9F3E5B722C0AEEE1UL, 0xA91711FDED89836EUL, 0x80E21258E3E49714UL,
- 0x7819026EF352AD7FUL, 0xC293097A18EBEB58UL, 0xCDD60C0948E07C98UL,
- 0x444C2170AC4C972AUL, 0xB714CA937966E535UL, 0x6F11F3358AFA71BCUL,
- 0xA84E8A3E6892C978UL, 0xE6308B5D0DB90822UL, 0x46E0A95E998B2B86UL,
- 0x6A5C6F56AEA55DDBUL, 0x1DB0599111046F3EUL, 0x55D6DB893B553280UL,
- 0x62C8F9D71B387563UL, 0x3389047820C4085CUL, 0xA744C6E6B040304BUL,
- 0xFD5D213F3F48497DUL, 0xCC5B2117B6532683UL, 0xDC1C19721683F83DUL,
- 0x1CB8405C21EB9AADUL, 0x8DB81937DF5C01B6UL, 0x99C6DF745BB3FAEBUL,
- 0x450BEAA37F336CEDUL, 0xF0154CEB08FB4623UL, 0xA00293117E29034BUL,
- 0xA66DD9AC091740E8UL, 0xB4E7455E47738348UL, 0x9BF6AB384A17588BUL,
- 0x355EA7E660615307UL, 0x29973430E7BD32C1UL, 0xFCF99196BA1453FEUL,
- 0x561E4A9749A31000UL, 0x996E40ACB907907CUL, 0x8C068A537891D817UL,
- 0xDB42112F997B7851UL, 0xFA785497B0DBA777UL, 0x28AEF904C18EE0E3UL,
- 0x8A70C563CE4B4567UL, 0x56A968C07D246D99UL, 0xFD327FAD0450EF8DUL,
- 0x00C7DA2B6C9F79F5UL, 0xCF6280916EBF0129UL, 0xAC978A54BDD2071DUL,
- 0x2D41D3E0C76E3F32UL, 0x63425615DB3281B4UL, 0x481BB08F50D69823UL,
- 0x5F80EE74AC0BE2BDUL, 0x0D3AC9CC76A2D632UL, 0xEDB7C0E219D80DFAUL,
- 0xCD2FA275D82EB2B6UL, 0x41898B02F28A159DUL, 0x1BD46018489C80B8UL,
- 0x3AE0AECD4BB1127DUL, 0xA0FF48E7432058DFUL, 0xD1CC9C721482F42CUL,
- 0x7B0FB481B5F19E03UL, 0xA221FDB32FC9174BUL, 0x1FE31F128748AD5CUL,
- 0xA9C80E0BB849C784UL, 0x9725ED5C207DEAB2UL, 0x8EEC7C5310933D31UL,
- 0xDE590C192A0B27B4UL, 0xE51CE519B6437021UL, 0x6E1057997FB1DEAEUL,
- 0xC57DF8FEB45EE6A4UL, 0xDE24D5C87D4555E2UL, 0xF00FC5511FE008C1UL,
- 0xC664EFBB36A481EDUL, 0x58688CC427EC4CC7UL, 0x254829013B0E76AEUL,
- 0xECD1857ED61869A5UL, 0x64CE789BDE508F7DUL, 0xF295CAAA594ECC58UL,
- 0x8F5B58B79C94EBE0UL, 0xA39BF312E6C61A6CUL, 0x0D00969829C5502BUL,
- 0xB8C13C1FC5CB718DUL, 0x3224118DA915B5EFUL, 0x10EC24C2121DD4D7UL,
- 0x1FB788E5D8E03357UL, 0x5E9F86D0099CE632UL, 0x673ED65F677821B0UL,
- 0x312A41E1B51549F9UL, 0x00DF25E45DAD76E2UL, 0x5A1561911C876B19UL,
- 0x1A58EF968CC11787UL, 0x029599EB8BD8719AUL, 0xEA27B36FFF5930F7UL,
- 0x04060010169D7A62UL, 0x5630B4458FBA3A71UL, 0xB9CB8F84D66A93F8UL,
- 0x3428A1C10490B5BAUL, 0x7E5857F34A1482F7UL, 0xCC62980D2ADAC41DUL,
- 0x903EC89CC55BD0CEUL, 0xFE9EC99089004024UL, 0xECD3E226F9BE420CUL,
- 0x17475B3D71CCA656UL, 0x5CCBD2176CA8DE01UL, 0xB13675D62856894CUL,
- 0x744032E639C3F11FUL, 0x0E349612CEAF382AUL, 0x41E516CDA67BB4DCUL,
- 0x343CB2990641694AUL, 0xEF1EE7E82B7E65CAUL, 0x32D3BD01D421A7CBUL,
- 0xD7FC605717AF512CUL, 0x62D776335ACAA6A6UL, 0xFDA7C7EFBEFFB24DUL,
- 0x1DA4421BE204563FUL, 0x7AC5071D7D6439ECUL, 0xB04907D74291F402UL,
- 0x1622EAB93909C0BEUL, 0x0104D4A240D85592UL, 0x902DAC0ADEE44311UL,
- 0xC1A9DFE403C0DA20UL, 0xF625780DB1B3F871UL, 0x75AB40C313DF9E55UL,
- 0xDFAE2CD087187B45UL, 0x417D7807D2171F9FUL, 0xCD1D1A444D86DF78UL,
- 0x87DE186A752CDB73UL, 0xEDEBA23523A0DC64UL, 0x10AA6B0C35F6B110UL,
- 0x38C31C863D4F4ED5UL, 0x7A4665420070B621UL, 0x4F2B5963CE4F5F6CUL,
- 0x1960F7AD866513A3UL, 0x3A7C924A978F8251UL, 0x56B8481940FDF39AUL,
- 0x11643EEFEEE1ACA6UL, 0xED127C507EF6C54CUL, 0xB5EBD3BFA89E9F67UL,
- 0x21879F26D4BE4A14UL, 0x8D6154A8A2027EA6UL, 0x1C69E882730B93C8UL,
- 0x8D7B11D1DD98B5F2UL, 0x76A7FAA7A888B1FBUL, 0x90A971E4C8F7AE28UL,
- 0x56A4D02DF123F5EAUL, 0x44A05664A7F03956UL, 0x309C6C63418B2616UL,
- 0x108CA042607E272AUL, 0x4AB8F3508ADDA60CUL, 0xA7FBBAF0BB17714BUL,
- 0x3CC8A384E2D96A84UL, 0x391E782A19AD5190UL, 0x23065DCE40659703UL,
- 0xC530D54413A3791EUL, 0x803E3C294BE1C26EUL, 0x61ABAAC14D74EC54UL,
- 0xA4F72A046456894DUL, 0x242893DB0DB83BB0UL, 0xD34E3160ADCB5CAFUL,
- 0x70DC7C26C140E652UL, 0xC61E965117931ED2UL, 0x6E292C67D1F4C3A7UL,
- 0xCBF4C4668630AD09UL, 0x89E71E5660F60C09UL, 0xB94E78B3D69CF448UL,
- 0x34F7E505129E67E8UL, 0x2B5692EB2F9ADB1FUL, 0x18B33EB5C6218B92UL,
- 0x69B0107420A2245FUL, 0x882D9A53746BB452UL, 0xD672B7869EA7CFD9UL,
- 0x19A7272D0738C53FUL, 0x1322E47C89337EB2UL, 0x812E69C0245E50D7UL,
- 0xF187AA4541ABDDD3UL, 0x8FEAA798A615B748UL, 0x667E3C139D8B56C8UL,
- 0xAEC9BF9F45CA5D44UL, 0xFBB9142069E57883UL, 0x094C75FB9845661DUL,
- 0x23A6C5F02F3A6C55UL, 0x9A16DA92770C6ECCUL, 0xF748C20B24D1DC6FUL,
- 0x7ACB623BBD295332UL, 0xEAEF79479E38A94CUL, 0x704D58570E2E5332UL,
- 0x036F52F5A9684E7CUL, 0xEC738490914BA27EUL, 0xF9278559E81D901EUL,
- 0x49821AAC204B64C2UL, 0x990985242F9C9A31UL, 0x06A3649A1BA11E75UL,
- 0xE4A1A9808B319814UL, 0x18A4498A7BBA0060UL, 0x75ED340849D3CCA3UL,
- 0x82225D786972A9E0UL, 0x8EADE60B8E678CD5UL, 0xC99BB41C1726AABDUL,
- 0x2AB9C9C8FAC6DC30UL, 0x0441780010493500UL, 0xDDDDE54767F517ADUL,
- 0x56DB8BCC493B8490UL, 0xD1A6739A09D42053UL, 0x617912F0246C3648UL,
- 0x6ADF565B9B17101DUL, 0x0CA0C0BEC98D33BBUL, 0xC920D715A451BC53UL,
- 0xA10E436864547E8FUL, 0x8A2686E7564305BAUL, 0xF5454820A996BC1FUL,
- 0xC9216226D09DDC39UL, 0x68A0E58CAE5C7DB9UL, 0x7F5252D3EA712008UL,
- 0x5BC5B55C5F4A9803UL, 0xAFC544F4F2E4002EUL, 0x6C42C429889A7D5CUL,
- 0x2F4F73AA425DEFA6UL, 0x2E6AFD00A266DEF0UL, 0x49CACCAAE1B2C278UL,
- 0xB62663F96D79781DUL, 0x87E5E67912BAD6F9UL, 0x93BF4AB146F447CFUL,
- 0xC942B3D03448F513UL, 0x50B6C04EC1C35605UL, 0x010B453F9ACBF9DDUL,
- 0x84CB000D0AA3E002UL, 0xB0AFA8BD656B2A9AUL, 0x736BC06ADC0DBADFUL,
- 0x18C9AE72A4F7F14DUL, 0x8B20226817FED9F7UL, 0x488201718D3F25AAUL,
- 0xB436031BF234430AUL, 0x301B579C25A81F6CUL, 0x94AD1143EF48395BUL,
- 0xD18DAC91770DE980UL, 0xB8B8E0C504956DE5UL, 0xDDC58A6B8AF36BD0UL,
- 0x70288138236C8C2EUL, 0x12566E4A4C2B5769UL, 0x323D3516D4611368UL,
- 0xC8A045E9E3E20B1FUL, 0x1B69C6DCD29AAE04UL, 0x24DA7006D030D431UL,
- 0x468A8E0A5523AF97UL, 0x075CABD7CAC6346DUL, 0x6AA5CE224365EB50UL,
- 0x888443448F8FC9F1UL, 0x4D04602CAD6D5208UL, 0x84FC44D5FE8D928EUL,
- 0x703E412307FC7C32UL, 0xAFBAEAA0E3D8BBAAUL, 0x7C32F528AA001332UL,
- 0x86BB81913BB879C7UL, 0x99853897C46219ABUL, 0xA213ED45FD500DD2UL,
- 0xD591D1A722685833UL, 0x33305B089DCD5298UL, 0x52D2E2138D12701CUL,
- 0x99B931133F6A60CDUL, 0x2633C5A928D65828UL
- };
-
- public static bool IsPopularPassword(char[] vPassword)
- {
- Debug.Assert(PpcTable.Length == (PpcTableSize / 64));
-
- if(vPassword == null) throw new ArgumentNullException("vPassword");
- if(vPassword.Length == 0) return false;
-
- foreach(char ch in vPassword)
- {
- if(!IsPopularChar(ch)) return false;
- }
-
- UTF8Encoding utf8 = new UTF8Encoding(false);
- byte[] pbUtf8 = utf8.GetBytes(vPassword);
-
- int[] vIndices = GetTableIndices(pbUtf8, PpcTableSize);
- Array.Clear(pbUtf8, 0, pbUtf8.Length);
-
- foreach(int iIndex in vIndices)
- {
- if(!GetTableBit(PpcTable, iIndex)) return false;
- }
-
- return true;
- }
-
- private static bool IsPopularChar(char ch)
- {
- return (((ch >= 'A') && (ch <= 'Z')) || ((ch >= 'a') && (ch <= 'z')) ||
- ((ch >= '0') && (ch <= '9')) || (ch == '_') || (ch == '!'));
- }
-
- private static int[] GetTableIndices(byte[] pbPasswordUtf8, int nTableSize)
- {
- Debug.Assert((nTableSize >= 2) && (nTableSize <= 0x10000));
- Debug.Assert((nTableSize % 64) == 0);
-
- SHA512Managed sha = new SHA512Managed();
- byte[] pbHash = sha.ComputeHash(pbPasswordUtf8);
-
- int[] vIndices = new int[pbHash.Length / 4]; // 4 by experiment
- for(int i = 0; i < vIndices.Length; ++i)
- vIndices[i] = ((((int)pbHash[i * 2] << 8) |
- (int)pbHash[i * 2 + 1]) % nTableSize);
-
- return vIndices;
- }
-
- private static bool GetTableBit(ulong[] vTable, int iBit)
- {
- return ((vTable[iBit >> 6] & (1UL << (iBit & 0x3F))) != 0UL);
- }
-
-#if (DEBUG && !KeePassLibSD)
- private static bool SetTableBit(ulong[] vTable, int iBit)
- {
- if(GetTableBit(vTable, iBit)) return false;
-
- vTable[iBit >> 6] = (vTable[iBit >> 6] | (1UL << (iBit & 0x3F)));
- return true;
- }
-
- public static void MakeList()
- {
- string strData = File.ReadAllText("MostPopularPasswords.txt", Encoding.UTF8);
- strData += " ";
- CharStream cs = new CharStream(strData);
-
- List<string> vPasswords = new List<string>();
- StringBuilder sbPassword = new StringBuilder();
- while(true)
- {
- char ch = cs.ReadChar();
- if(ch == char.MinValue) break;
-
- if(char.IsWhiteSpace(ch))
- {
- string strPassword = sbPassword.ToString();
- strPassword = strPassword.ToLower();
-
- if(strPassword.Length > 3)
- {
- if(vPasswords.IndexOf(strPassword) < 0)
- vPasswords.Add(strPassword);
- }
-
- sbPassword = new StringBuilder();
- }
- else
- {
- Debug.Assert(!char.IsControl(ch) && !char.IsHighSurrogate(ch) &&
- !char.IsLowSurrogate(ch) && !char.IsSurrogate(ch));
- Debug.Assert(IsPopularChar(ch));
- sbPassword.Append(ch);
- }
- }
-
- ulong[] vTable = new ulong[PpcTableSize / 64];
- Array.Clear(vTable, 0, vTable.Length);
-
- long lBitsInTable = 0;
- UTF8Encoding utf8 = new UTF8Encoding(false);
- foreach(string strPassword in vPasswords)
- {
- byte[] pbUtf8 = utf8.GetBytes(strPassword);
- int[] vIndices = GetTableIndices(pbUtf8, PpcTableSize);
-
- foreach(int i in vIndices)
- {
- if(SetTableBit(vTable, i)) ++lBitsInTable;
- }
- }
-
- StringBuilder sb = new StringBuilder();
- sb.Append("\t\t\t");
- for(int i = 0; i < vTable.Length; ++i)
- {
- if(i > 0)
- {
- if((i % 3) == 0)
- {
- sb.AppendLine(",");
- sb.Append("\t\t\t");
- }
- else sb.Append(", ");
- }
-
- sb.Append("0x");
- sb.Append(vTable[i].ToString("X16"));
- sb.Append("UL");
- }
-
- sb.AppendLine();
- sb.AppendLine();
- sb.AppendLine("Bits set: " + lBitsInTable.ToString() + " of " +
- PpcTableSize.ToString());
- int cHashFn = GetTableIndices(utf8.GetBytes("Dummy"), PpcTableSize).Length;
- sb.AppendLine("Hash functions: " + cHashFn.ToString());
- double dblPhi = Math.Pow(1.0 - ((double)cHashFn / PpcTableSize),
- (double)vPasswords.Count);
- sb.AppendLine("Phi (bits unset ratio) estimation: " +
- dblPhi.ToString(CultureInfo.InvariantCulture));
- dblPhi = ((double)(PpcTableSize - lBitsInTable) / (double)PpcTableSize);
- sb.AppendLine("Exact Phi: " + dblPhi.ToString(CultureInfo.InvariantCulture));
- sb.AppendLine("False positives ratio: " + Math.Pow(1.0 - dblPhi,
- (double)cHashFn).ToString(CultureInfo.InvariantCulture));
-
- File.WriteAllText("Table.txt", sb.ToString());
- }
-#endif
- }
-}
diff --git a/Ext/DeprecatedSources/ProtectedString_111029.cs b/Ext/DeprecatedSources/ProtectedString_111029.cs
deleted file mode 100644
index e37fd06..0000000
--- a/Ext/DeprecatedSources/ProtectedString_111029.cs
+++ /dev/null
@@ -1,436 +0,0 @@
-/*
- KeePass Password Safe - The Open-Source Password Manager
- Copyright (C) 2003-2011 Dominik Reichl <dominik.reichl at t-online.de>
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-*/
-
-using System;
-using System.Security;
-using System.Text;
-using System.Diagnostics;
-using System.Runtime.InteropServices;
-
-using KeePassLib.Cryptography;
-using KeePassLib.Utility;
-
-#if KeePassLibSD
-using KeePassLibSD;
-#endif
-
-namespace KeePassLib.Security
-{
- /// <summary>
- /// Represents an in-memory encrypted string.
- /// </summary>
-#if (DEBUG && !KeePassLibSD)
- [DebuggerDisplay(@"{ReadString()}")]
-#endif
- public sealed class ProtectedString
- {
- // SecureString objects are supported only on Windows 2000 SP3 and
- // higher. On all other systems (98 / ME) we use a standard string
- // object instead of the secure one. This of course decreases the
- // security of the class, but at least allows the application
- // to run on older systems, too.
- private SecureString m_secString = null; // Created in constructor
- private string m_strAlternativeSecString = string.Empty;
-
- private string m_strPlainText = string.Empty; // Never null
- private bool m_bIsProtected = false; // See default constructor
-
- private XorredBuffer m_xbEncrypted = null; // UTF-8 representation
-
- /// <summary>
- /// A flag specifying whether the <c>ProtectedString</c> object has turned on
- /// in-memory protection or not.
- /// </summary>
- public bool IsProtected
- {
- get { return m_bIsProtected; }
- }
-
- /// <summary>
- /// A value specifying whether the <c>ProtectedString</c> object is currently
- /// in-memory protected or not. This flag can be different than
- /// <c>IsProtected</c>: if a <c>XorredBuffer</c> is used, the <c>IsProtected</c>
- /// flag represents the memory protection flag, but not the actual protection.
- /// In this case use <c>IsViewable</c>, which returns <c>true</c> if a
- /// <c>XorredBuffer</c> is currently in use.
- /// </summary>
- public bool IsViewable
- {
- get { return (!m_bIsProtected && (m_xbEncrypted == null)); }
- }
-
- public bool IsEmpty
- {
- get
- {
- if(m_xbEncrypted != null) return (m_xbEncrypted.Length == 0);
-
- if(m_bIsProtected)
- {
- if(m_secString != null) return (m_secString.Length == 0);
- else return (m_strAlternativeSecString.Length == 0);
- }
-
- return (m_strPlainText.Length == 0);
- }
- }
-
- public int Length
- {
- get
- {
- if(m_xbEncrypted != null)
- {
- byte[] pb = m_xbEncrypted.ReadPlainText();
-
- string str = StrUtil.Utf8.GetString(pb, 0, pb.Length);
- SetString(str); // Clear the XorredBuffer object
-
- // No need to erase the pb buffer, the plain text is
- // now readable in memory anyway (in str).
-
- return ((str != null) ? str.Length : 0);
- }
-
- if(m_bIsProtected)
- {
- if(m_secString != null) return m_secString.Length;
- else return m_strAlternativeSecString.Length;
- }
-
- return m_strPlainText.Length; // Unprotected string
- }
- }
-
- /// <summary>
- /// Construct a new protected string object. Protection is
- /// disabled by default! You need to call the
- /// <c>EnableProtection</c> member function in order to
- /// enable the protection, if you wish the string to be protected.
- /// </summary>
- public ProtectedString()
- {
- try { m_secString = new SecureString(); }
- catch(NotSupportedException) { } // Windows 98 / ME
- }
-
- /// <summary>
- /// Construct a new in-memory encrypted string object.
- /// </summary>
- /// <param name="bEnableProtection">If this parameter is <c>true</c>,
- /// the string will be protected in-memory (encrypted). If it
- /// is <c>false</c>, the string will be stored as plain-text.</param>
- public ProtectedString(bool bEnableProtection)
- {
- try { m_secString = new SecureString(); }
- catch(NotSupportedException) { } // Windows 98 / ME
-
- m_bIsProtected = bEnableProtection;
- }
-
- /// <summary>
- /// Construct a new protected string. The string is initialized
- /// to the value supplied in the parameters.
- /// </summary>
- /// <param name="bEnableProtection">If this parameter is <c>true</c>,
- /// the string will be protected in-memory (encrypted). If it
- /// is <c>false</c>, the string will be stored as plain-text.</param>
- /// <param name="strValue">The initial string value. This
- /// parameter won't be modified.</param>
- public ProtectedString(bool bEnableProtection, string strValue)
- {
- try { m_secString = new SecureString(); }
- catch(NotSupportedException) { } // Windows 98 / ME
-
- m_bIsProtected = bEnableProtection;
- SetString(strValue);
- }
-
- /// <summary>
- /// Construct a new protected string. The string is initialized
- /// to the value supplied in the parameters (UTF-8 encoded string).
- /// </summary>
- /// <param name="bEnableProtection">If this parameter is <c>true</c>,
- /// the string will be protected in-memory (encrypted). If it
- /// is <c>false</c>, the string will be stored as plain-text.</param>
- /// <param name="vUtf8Value">The initial string value, encoded as
- /// UTF-8 byte array. This parameter won't be modified.</param>
- public ProtectedString(bool bEnableProtection, byte[] vUtf8Value)
- {
- if(vUtf8Value == null) throw new ArgumentNullException("vUtf8Value");
-
- try { m_secString = new SecureString(); }
- catch(NotSupportedException) { } // Windows 98 / ME
-
- m_bIsProtected = bEnableProtection;
- SetString(StrUtil.Utf8.GetString(vUtf8Value, 0, vUtf8Value.Length));
- }
-
- /// <summary>
- /// Construct a new protected string. The string is initialized
- /// to the value passed in the <c>pbTemplate</c> protected string.
- /// </summary>
- /// <param name="psTemplate">The initial string value. This
- /// parameter won't be modified. Must not be <c>null</c>.</param>
- /// <exception cref="System.ArgumentNullException">Thrown if the input
- /// parameter is <c>null</c>.</exception>
- public ProtectedString(ProtectedString psTemplate)
- {
- Debug.Assert(psTemplate != null);
- if(psTemplate == null) throw new ArgumentNullException("psTemplate");
-
- try { m_secString = new SecureString(); }
- catch(NotSupportedException) { } // Windows 98 / ME
-
- m_bIsProtected = psTemplate.m_bIsProtected;
- SetString(psTemplate.ReadString());
- }
-
- /// <summary>
- /// Construct a new protected string. The string is initialized
- /// to the value passed in the <c>XorredBuffer</c> object.
- /// </summary>
- /// <param name="bEnableProtection">Enable protection or not.</param>
- /// <param name="xbProtected"><c>XorredBuffer</c> object containing the
- /// string in UTF-8 representation. The UTF-8 string must not
- /// be <c>null</c>-terminated.</param>
- /// <exception cref="System.ArgumentNullException">Thrown if the input
- /// parameter is <c>null</c>.</exception>
- public ProtectedString(bool bEnableProtection, XorredBuffer xbProtected)
- {
- Debug.Assert(xbProtected != null);
- if(xbProtected == null) throw new ArgumentNullException("xbProtected");
-
- try { m_secString = new SecureString(); }
- catch(NotSupportedException) { } // Windows 98 / ME
-
- m_bIsProtected = bEnableProtection;
- m_xbEncrypted = xbProtected;
- }
-
- /// <summary>
- /// Clear the string. Doesn't change the protection level.
- /// </summary>
- public void Clear()
- {
- if(m_secString != null) m_secString.Clear();
- else m_strAlternativeSecString = string.Empty;
-
- m_strPlainText = string.Empty;
-
- m_xbEncrypted = null;
- }
-
- /// <summary>
- /// Change the protection level (protect or don't protect). Note: you
- /// only need to call this function if you really want to change the
- /// protection. If you specified the protection flag in the constructor,
- /// and don't want to change it, you don't need to call this function.
- /// </summary>
- /// <param name="bProtect">If <c>true</c>, the string will be protected
- /// (encrypted in-memory). Otherwise the string will be stored in
- /// plain-text in the process memory.</param>
- public void EnableProtection(bool bProtect)
- {
- if(m_xbEncrypted != null)
- {
- m_bIsProtected = bProtect;
- return;
- }
-
- if(m_bIsProtected && !bProtect) // Unprotect
- {
- string strPlainText = ReadString();
-
- Clear();
-
- m_strPlainText = strPlainText;
- m_bIsProtected = false;
- }
- else if(!m_bIsProtected && bProtect) // Protect
- {
- m_bIsProtected = true;
-
- SetString(m_strPlainText);
- }
- }
-
- /// <summary>
- /// Assign a new string value to the object.
- /// </summary>
- /// <param name="strNewValue">New string. The string must not contain
- /// a <c>null</c> terminator.</param>
- /// <exception cref="System.ArgumentNullException">Thrown if the input
- /// parameter is <c>null</c>.</exception>
- /// <exception cref="System.ArgumentException">Thrown if the new string
- /// contains a <c>null</c> terminator.</exception>
- public void SetString(string strNewValue)
- {
- Clear();
-
- Debug.Assert(strNewValue != null); if(strNewValue == null) throw new ArgumentNullException("strNewValue");
-
- // String must not contain any null character
- Debug.Assert(strNewValue.IndexOf((char)0) < 0);
-
- if(m_bIsProtected)
- {
- if(m_secString != null)
- {
- char ch;
- for(int i = 0; i < strNewValue.Length; ++i)
- {
- ch = strNewValue[i];
- if(ch == 0) throw new ArgumentException();
-
- m_secString.AppendChar(ch);
- }
- }
- else m_strAlternativeSecString = strNewValue;
- }
- else // Currently not protected
- {
- m_strPlainText = strNewValue;
- }
- }
-
- /// <summary>
- /// Convert the protected string to a normal string object.
- /// Be careful with this function, the returned string object
- /// isn't protected any more and stored in plain-text in the
- /// process memory.
- /// </summary>
- /// <returns>Plain-text string. Is never <c>null</c>.</returns>
- public string ReadString()
- {
- if(m_xbEncrypted != null)
- {
- byte[] pb = m_xbEncrypted.ReadPlainText();
-
- string str = StrUtil.Utf8.GetString(pb, 0, pb.Length);
- SetString(str); // Clear the XorredBuffer object
-
- // No need to erase the pb buffer, the plain text is
- // now readable in memory anyway (in str).
-
- return (str ?? string.Empty);
- }
-
- if(m_bIsProtected)
- {
- if(m_secString != null)
- {
-#if !KeePassLibSD
- IntPtr p = Marshal.SecureStringToGlobalAllocUnicode(m_secString);
- string str = Marshal.PtrToStringUni(p);
- Marshal.ZeroFreeGlobalAllocUnicode(p);
-#else
- string str = m_secString.ReadAsString();
-#endif
- return (str ?? string.Empty);
- }
- else return m_strAlternativeSecString;
- }
-
- return m_strPlainText; // Unprotected string
- }
-
- /// <summary>
- /// Read out the string and return a byte array that contains the
- /// string encoded using UTF-8. The returned string is not protected
- /// anymore!
- /// </summary>
- /// <returns>Plain-text UTF-8 byte array.</returns>
- public byte[] ReadUtf8()
- {
- if(m_xbEncrypted != null)
- {
- byte[] pb = m_xbEncrypted.ReadPlainText();
-
- // Clear XorredBuffer
- SetString(StrUtil.Utf8.GetString(pb, 0, pb.Length));
-
- return pb;
- }
-
- if(m_bIsProtected)
- {
- if(m_secString != null)
- {
-#if !KeePassLibSD
- Debug.Assert(sizeof(char) == 2);
- char[] vChars = new char[m_secString.Length];
-
- IntPtr p = Marshal.SecureStringToGlobalAllocUnicode(m_secString);
- for(int i = 0; i < vChars.Length; ++i)
- vChars[i] = (char)Marshal.ReadInt16(p, i * 2);
- Marshal.ZeroFreeGlobalAllocUnicode(p);
-
- byte[] pb = StrUtil.Utf8.GetBytes(vChars, 0, vChars.Length);
- Array.Clear(vChars, 0, vChars.Length);
-#else
- byte[] pb = StrUtil.Utf8.GetBytes(m_secString.ReadAsString());
-#endif
- return pb;
- }
- else return StrUtil.Utf8.GetBytes(m_strAlternativeSecString);
- }
-
- return StrUtil.Utf8.GetBytes(m_strPlainText); // Unprotected string
- }
-
- /// <summary>
- /// Read the protected string and return it protected with a sequence
- /// of bytes generated by a random stream. The object's data will be
- /// invisible in process memory only if the object has been initialized
- /// using a <c>XorredBuffer</c>. If no <c>XorredBuffer</c> has been used
- /// or the string has been read once already (in plain-text), the
- /// operation won't be secure and the protected string will be visible
- /// in process memory.
- /// </summary>
- /// <param name="crsRandomSource">Random number source.</param>
- /// <returns>Protected string.</returns>
- /// <exception cref="System.ArgumentNullException">Thrown if the input
- /// parameter is <c>null</c>.</exception>
- public byte[] ReadXorredString(CryptoRandomStream crsRandomSource)
- {
- Debug.Assert(crsRandomSource != null); if(crsRandomSource == null) throw new ArgumentNullException("crsRandomSource");
-
- if(m_xbEncrypted != null)
- {
- uint uLen = m_xbEncrypted.Length;
- byte[] randomPad = crsRandomSource.GetRandomBytes(uLen);
- return m_xbEncrypted.ChangeKey(randomPad);
- }
- else // Not using XorredBuffer
- {
- byte[] pbData = ReadUtf8();
- uint uLen = (uint)pbData.Length;
-
- byte[] randomPad = crsRandomSource.GetRandomBytes(uLen);
- Debug.Assert(randomPad.Length == uLen);
-
- for(uint i = 0; i < uLen; ++i)
- pbData[i] ^= randomPad[i];
-
- return pbData;
- }
- }
- }
-}
diff --git a/Ext/DeprecatedSources/ShInstUtil/Program.cs b/Ext/DeprecatedSources/ShInstUtil/Program.cs
deleted file mode 100644
index ba84f37..0000000
--- a/Ext/DeprecatedSources/ShInstUtil/Program.cs
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- KeePass Password Safe - The Open-Source Password Manager
- Copyright (C) 2003-2009 Dominik Reichl <dominik.reichl at t-online.de>
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-*/
-
-using System;
-using System.Collections.Generic;
-using System.Windows.Forms;
-using System.IO;
-using System.Reflection;
-using System.Diagnostics;
-
-using Microsoft.Win32;
-
-namespace ShInstUtil
-{
- public static class Program
- {
- [STAThread]
- public static void Main(string[] args)
- {
- Application.EnableVisualStyles();
- Application.SetCompatibleTextRenderingDefault(false);
-
- if((args == null) || (args.Length == 0)) return;
-
- string strCmd = args[0];
- if(string.IsNullOrEmpty(strCmd)) return;
- strCmd = strCmd.ToLower();
- strCmd = strCmd.Trim(new char[]{ '\r', '\n', ' ', '\t', '-', '/',
- '\"', '\'' });
-
- if(strCmd == "ngen_install")
- {
- UpdateNativeImage(false);
- UpdateNativeImage(true);
- }
- else if(strCmd == "ngen_uninstall")
- UpdateNativeImage(false);
- }
-
- private static string FindNGenPath()
- {
- RegistryKey kSoftware = Registry.LocalMachine.OpenSubKey("SOFTWARE");
- RegistryKey kMicrosoft = kSoftware.OpenSubKey("Microsoft");
- RegistryKey kNet = kMicrosoft.OpenSubKey(".NETFramework");
-
- string strPath = (kNet.GetValue("InstallRoot") as string);
-
- kNet.Close();
- kMicrosoft.Close();
- kSoftware.Close();
-
- if(string.IsNullOrEmpty(strPath)) return null;
-
- DirectoryInfo di = new DirectoryInfo(strPath);
- FileInfo[] vNGens = di.GetFiles("ngen.exe", SearchOption.AllDirectories);
- if((vNGens == null) || (vNGens.Length == 0)) return null;
-
- strPath = null;
- DateTime dt = DateTime.MinValue.AddYears(1);
- foreach(FileInfo fi in vNGens)
- {
- if(fi.CreationTime >= dt)
- {
- strPath = fi.FullName;
- dt = fi.CreationTime;
- }
- }
-
- return strPath;
- }
-
- private static void UpdateNativeImage(bool bInstall)
- {
- try
- {
- string strNGen = FindNGenPath();
- if(string.IsNullOrEmpty(strNGen)) return;
-
- string strMe = Assembly.GetExecutingAssembly().Location;
- string strBasePath = Path.GetDirectoryName(strMe).Trim(new char[]{
- '\r', '\n', ' ', '\t', '\"', '\'' });
- string strToReg = strBasePath + Path.DirectorySeparatorChar + "KeePass.exe";
-
- string strPreCmd = (bInstall ? string.Empty : "un");
-
- ProcessStartInfo psi = new ProcessStartInfo();
- psi.Arguments = strPreCmd + "install \"" + strToReg + "\"";
- psi.CreateNoWindow = true;
- psi.FileName = strNGen;
- psi.WindowStyle = ProcessWindowStyle.Hidden;
-
- Process p = Process.Start(psi);
- p.WaitForExit(16000);
- }
- catch(Exception) { }
- }
- }
-}
diff --git a/Ext/DeprecatedSources/ShInstUtil/Properties/AssemblyInfo.cs b/Ext/DeprecatedSources/ShInstUtil/Properties/AssemblyInfo.cs
deleted file mode 100644
index 0a72271..0000000
--- a/Ext/DeprecatedSources/ShInstUtil/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- KeePass Password Safe - The Open-Source Password Manager
- Copyright (C) 2003-2009 Dominik Reichl <dominik.reichl at t-online.de>
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-*/
-
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// General assembly properties
-[assembly: AssemblyTitle("ShInstUtil - KeePass Installation Utility")]
-[assembly: AssemblyDescription("Installation Utility")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("Dominik Reichl")]
-[assembly: AssemblyProduct("ShInstUtil - KeePass Installation Utility")]
-[assembly: AssemblyCopyright("Copyright © 2007-2009 Dominik Reichl")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// COM settings
-[assembly: ComVisible(false)]
-
-// Assembly GUID
-[assembly: Guid("7e0eb6e8-4f13-4b04-aad9-2acf8417a776")]
-
-// Assembly version information
-[assembly: AssemblyVersion("2.0.8.*")]
-[assembly: AssemblyFileVersion("2.0.8.0")]
diff --git a/Ext/DeprecatedSources/ShInstUtil/Properties/Resources.Designer.cs b/Ext/DeprecatedSources/ShInstUtil/Properties/Resources.Designer.cs
deleted file mode 100644
index 128a6da..0000000
--- a/Ext/DeprecatedSources/ShInstUtil/Properties/Resources.Designer.cs
+++ /dev/null
@@ -1,63 +0,0 @@
-//------------------------------------------------------------------------------
-// <auto-generated>
-// This code was generated by a tool.
-// Runtime Version:2.0.50727.1433
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-// </auto-generated>
-//------------------------------------------------------------------------------
-
-namespace ShInstUtil.Properties {
- using System;
-
-
- /// <summary>
- /// A strongly-typed resource class, for looking up localized strings, etc.
- /// </summary>
- // This class was auto-generated by the StronglyTypedResourceBuilder
- // class via a tool like ResGen or Visual Studio.
- // To add or remove a member, edit your .ResX file then rerun ResGen
- // with the /str option, or rebuild your VS project.
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- internal class Resources {
-
- private static global::System.Resources.ResourceManager resourceMan;
-
- private static global::System.Globalization.CultureInfo resourceCulture;
-
- [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
- internal Resources() {
- }
-
- /// <summary>
- /// Returns the cached ResourceManager instance used by this class.
- /// </summary>
- [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- internal static global::System.Resources.ResourceManager ResourceManager {
- get {
- if (object.ReferenceEquals(resourceMan, null)) {
- global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ShInstUtil.Properties.Resources", typeof(Resources).Assembly);
- resourceMan = temp;
- }
- return resourceMan;
- }
- }
-
- /// <summary>
- /// Overrides the current thread's CurrentUICulture property for all
- /// resource lookups using this strongly typed resource class.
- /// </summary>
- [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- internal static global::System.Globalization.CultureInfo Culture {
- get {
- return resourceCulture;
- }
- set {
- resourceCulture = value;
- }
- }
- }
-}
diff --git a/Ext/DeprecatedSources/ShInstUtil/Properties/Resources.resx b/Ext/DeprecatedSources/ShInstUtil/Properties/Resources.resx
deleted file mode 100644
index ffecec8..0000000
--- a/Ext/DeprecatedSources/ShInstUtil/Properties/Resources.resx
+++ /dev/null
@@ -1,117 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<root>
- <!--
- Microsoft ResX Schema
-
- Version 2.0
-
- The primary goals of this format is to allow a simple XML format
- that is mostly human readable. The generation and parsing of the
- various data types are done through the TypeConverter classes
- associated with the data types.
-
- Example:
-
- ... ado.net/XML headers & schema ...
- <resheader name="resmimetype">text/microsoft-resx</resheader>
- <resheader name="version">2.0</resheader>
- <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
- <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
- <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
- <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
- <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
- <value>[base64 mime encoded serialized .NET Framework object]</value>
- </data>
- <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
- <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
- <comment>This is a comment</comment>
- </data>
-
- There are any number of "resheader" rows that contain simple
- name/value pairs.
-
- Each data row contains a name, and value. The row also contains a
- type or mimetype. Type corresponds to a .NET class that support
- text/value conversion through the TypeConverter architecture.
- Classes that don't support this are serialized and stored with the
- mimetype set.
-
- The mimetype is used for serialized objects, and tells the
- ResXResourceReader how to depersist the object. This is currently not
- extensible. For a given mimetype the value must be set accordingly:
-
- Note - application/x-microsoft.net.object.binary.base64 is the format
- that the ResXResourceWriter will generate, however the reader can
- read any of the formats listed below.
-
- mimetype: application/x-microsoft.net.object.binary.base64
- value : The object must be serialized with
- : System.Serialization.Formatters.Binary.BinaryFormatter
- : and then encoded with base64 encoding.
-
- mimetype: application/x-microsoft.net.object.soap.base64
- value : The object must be serialized with
- : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
- : and then encoded with base64 encoding.
-
- mimetype: application/x-microsoft.net.object.bytearray.base64
- value : The object must be serialized into a byte array
- : using a System.ComponentModel.TypeConverter
- : and then encoded with base64 encoding.
- -->
- <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
- <xsd:element name="root" msdata:IsDataSet="true">
- <xsd:complexType>
- <xsd:choice maxOccurs="unbounded">
- <xsd:element name="metadata">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" />
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" />
- <xsd:attribute name="type" type="xsd:string" />
- <xsd:attribute name="mimetype" type="xsd:string" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="assembly">
- <xsd:complexType>
- <xsd:attribute name="alias" type="xsd:string" />
- <xsd:attribute name="name" type="xsd:string" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="data">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
- <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
- <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
- <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="resheader">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" use="required" />
- </xsd:complexType>
- </xsd:element>
- </xsd:choice>
- </xsd:complexType>
- </xsd:element>
- </xsd:schema>
- <resheader name="resmimetype">
- <value>text/microsoft-resx</value>
- </resheader>
- <resheader name="version">
- <value>2.0</value>
- </resheader>
- <resheader name="reader">
- <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </resheader>
- <resheader name="writer">
- <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </resheader>
-</root>
\ No newline at end of file
diff --git a/Ext/DeprecatedSources/ShInstUtil/Properties/Settings.Designer.cs b/Ext/DeprecatedSources/ShInstUtil/Properties/Settings.Designer.cs
deleted file mode 100644
index 82e5aad..0000000
--- a/Ext/DeprecatedSources/ShInstUtil/Properties/Settings.Designer.cs
+++ /dev/null
@@ -1,26 +0,0 @@
-//------------------------------------------------------------------------------
-// <auto-generated>
-// This code was generated by a tool.
-// Runtime Version:2.0.50727.1433
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-// </auto-generated>
-//------------------------------------------------------------------------------
-
-namespace ShInstUtil.Properties {
-
-
- [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "9.0.0.0")]
- internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
-
- private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
-
- public static Settings Default {
- get {
- return defaultInstance;
- }
- }
- }
-}
diff --git a/Ext/DeprecatedSources/ShInstUtil/Properties/Settings.settings b/Ext/DeprecatedSources/ShInstUtil/Properties/Settings.settings
deleted file mode 100644
index abf36c5..0000000
--- a/Ext/DeprecatedSources/ShInstUtil/Properties/Settings.settings
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version='1.0' encoding='utf-8'?>
-<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
- <Profiles>
- <Profile Name="(Default)" />
- </Profiles>
- <Settings />
-</SettingsFile>
diff --git a/Ext/DeprecatedSources/ShInstUtil/ShInstUtil.csproj b/Ext/DeprecatedSources/ShInstUtil/ShInstUtil.csproj
deleted file mode 100644
index c2a3539..0000000
--- a/Ext/DeprecatedSources/ShInstUtil/ShInstUtil.csproj
+++ /dev/null
@@ -1,75 +0,0 @@
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>8.0.50727</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{D6240ED0-5AE4-4F6D-B1F1-C691630B4D3F}</ProjectGuid>
- <OutputType>WinExe</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>ShInstUtil</RootNamespace>
- <AssemblyName>ShInstUtil</AssemblyName>
- <SignAssembly>true</SignAssembly>
- <AssemblyOriginatorKeyFile>ShInstUtil.pfx</AssemblyOriginatorKeyFile>
- <FileUpgradeFlags>
- </FileUpgradeFlags>
- <OldToolsVersion>2.0</OldToolsVersion>
- <UpgradeBackupLocation>
- </UpgradeBackupLocation>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>..\Build\ShInstUtil\Debug\</OutputPath>
- <DefineConstants>DEBUG;TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>..\Build\ShInstUtil\Release\</OutputPath>
- <DefineConstants>TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="System" />
- <Reference Include="System.Drawing" />
- <Reference Include="System.Windows.Forms" />
- <Reference Include="System.Xml" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="Program.cs" />
- <Compile Include="Properties\AssemblyInfo.cs" />
- <EmbeddedResource Include="Properties\Resources.resx">
- <Generator>ResXFileCodeGenerator</Generator>
- <LastGenOutput>Resources.Designer.cs</LastGenOutput>
- <SubType>Designer</SubType>
- </EmbeddedResource>
- <Compile Include="Properties\Resources.Designer.cs">
- <AutoGen>True</AutoGen>
- <DependentUpon>Resources.resx</DependentUpon>
- <DesignTime>True</DesignTime>
- </Compile>
- <None Include="Properties\Settings.settings">
- <Generator>SettingsSingleFileGenerator</Generator>
- <LastGenOutput>Settings.Designer.cs</LastGenOutput>
- </None>
- <None Include="ShInstUtil.pfx" />
- <Compile Include="Properties\Settings.Designer.cs">
- <AutoGen>True</AutoGen>
- <DependentUpon>Settings.settings</DependentUpon>
- <DesignTimeSharedInput>True</DesignTimeSharedInput>
- </Compile>
- </ItemGroup>
- <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
-</Project>
\ No newline at end of file
diff --git a/Ext/DeprecatedSources/ShInstUtil/ShInstUtil.pfx b/Ext/DeprecatedSources/ShInstUtil/ShInstUtil.pfx
deleted file mode 100644
index 19b0155..0000000
Binary files a/Ext/DeprecatedSources/ShInstUtil/ShInstUtil.pfx and /dev/null differ
diff --git a/Ext/DeprecatedSources/UpdateCheck_111216.cs b/Ext/DeprecatedSources/UpdateCheck_111216.cs
deleted file mode 100644
index aaae237..0000000
--- a/Ext/DeprecatedSources/UpdateCheck_111216.cs
+++ /dev/null
@@ -1,205 +0,0 @@
-/*
- KeePass Password Safe - The Open-Source Password Manager
- Copyright (C) 2003-2011 Dominik Reichl <dominik.reichl at t-online.de>
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-*/
-
-using System;
-using System.Collections.Generic;
-using System.Text;
-using System.Net;
-using System.Net.Cache;
-using System.Windows.Forms;
-using System.Xml;
-using System.Diagnostics;
-using System.Threading;
-
-// using KeePass.Native;
-using KeePass.Resources;
-
-using KeePassLib;
-using KeePassLib.Resources;
-using KeePassLib.Serialization;
-using KeePassLib.Utility;
-
-namespace KeePass.Util
-{
- /* public static class UpdateCheck
- {
- private const string ElemRoot = "KeePass";
-
- private const string ElemVersionU = "Version32";
- private const string ElemVersionStr = "VersionDisplayString";
-
- private static volatile string m_strVersionURL = string.Empty;
- private static volatile ToolStripStatusLabel m_tsResultsViewer = null;
-
- public static void StartAsync(string strVersionUrl, ToolStripStatusLabel tsResultsViewer)
- {
- m_strVersionURL = strVersionUrl;
- m_tsResultsViewer = tsResultsViewer;
-
- // Local, but thread will continue to run anyway
- Thread th = new Thread(new ThreadStart(UpdateCheck.OnStartCheck));
- th.Start();
- }
-
- private static void OnStartCheck()
- {
- // NativeProgressDialog dlg = null;
- // if(m_tsResultsViewer == null)
- // {
- // dlg = new NativeProgressDialog();
- // dlg.StartLogging(KPRes.Wait + "...", false);
- // }
-
- try
- {
- IOWebClient webClient = new IOWebClient();
- IOConnection.ConfigureWebClient(webClient);
-
- Uri uri = new Uri(m_strVersionURL);
-
- webClient.DownloadDataCompleted +=
- new DownloadDataCompletedEventHandler(OnDownloadCompleted);
-
- webClient.DownloadDataAsync(uri);
- }
- // catch(NotImplementedException)
- // {
- // ReportStatusEx(KLRes.FrameworkNotImplExcp, true);
- // }
- catch(Exception) { }
-
- // if(dlg != null) dlg.EndLogging();
- }
-
- private static void OnDownloadCompleted(object sender, DownloadDataCompletedEventArgs e)
- {
- string strXmlFile = NetUtil.GZipUtf8ResultToString(e);
-
- if(strXmlFile == null)
- {
- if(e.Error != null)
- {
- if(m_tsResultsViewer == null)
- MessageService.ShowWarning(KPRes.UpdateCheckingFailed, e.Error);
- else if(e.Error.Message != null)
- UpdateCheck.SetTsStatus(KPRes.UpdateCheckingFailed + " " +
- e.Error.Message);
- }
- else ReportStatusEx(KPRes.UpdateCheckingFailed, true);
-
- return;
- }
-
- XmlDocument xmlDoc = new XmlDocument();
-
- try { xmlDoc.LoadXml(strXmlFile); }
- catch(Exception)
- {
- StructureFail();
- return;
- }
-
- XmlElement xmlRoot = xmlDoc.DocumentElement;
- if(xmlRoot == null) { StructureFail(); return; }
- if(xmlRoot.Name != ElemRoot) { StructureFail(); return; }
-
- uint uVersion = 0;
-
- foreach(XmlNode xmlChild in xmlRoot.ChildNodes)
- {
- if(xmlChild.Name == ElemVersionU)
- uint.TryParse(xmlChild.InnerText, out uVersion);
- else if(xmlChild.Name == ElemVersionStr)
- {
- // strVersion = xmlChild.InnerText;
- }
- }
-
- if(uVersion > PwDefs.Version32)
- {
- if(m_tsResultsViewer == null)
- {
- if(MessageService.AskYesNo(KPRes.ChkForUpdNewVersion +
- MessageService.NewParagraph + KPRes.WebsiteVisitQuestion))
- {
- WinUtil.OpenUrl(PwDefs.HomepageUrl, null);
- }
- }
- else UpdateCheck.SetTsStatus(KPRes.ChkForUpdNewVersion);
- }
- else if(uVersion == PwDefs.Version32)
- ReportStatusEx(KPRes.ChkForUpdGotLatest, false);
- else
- ReportStatusEx(KPRes.UnknownFileVersion, true);
- }
-
- private static void ReportStatusEx(string strText, bool bIsWarning)
- {
- ReportStatusEx(strText, strText, bIsWarning);
- }
-
- private static void ReportStatusEx(string strLongText, string strShortText,
- bool bIsWarning)
- {
- if(m_tsResultsViewer == null)
- {
- if(bIsWarning) MessageService.ShowWarning(strLongText);
- else MessageService.ShowInfo(strLongText);
- }
- else UpdateCheck.SetTsStatus(strShortText);
- }
-
- private static void StructureFail()
- {
- Debug.Assert(false);
-
- if(m_tsResultsViewer == null)
- MessageService.ShowWarning(KPRes.InvalidFileStructure);
- else
- UpdateCheck.SetTsStatus(KPRes.ChkForUpdGotLatest + " " +
- KPRes.InvalidFileStructure);
- }
-
- private static void SetTsStatus(string strText)
- {
- if(strText == null) { Debug.Assert(false); return; }
- if(m_tsResultsViewer == null) { Debug.Assert(false); return; }
-
- try
- {
- ToolStrip pParent = m_tsResultsViewer.Owner;
- if((pParent != null) && pParent.InvokeRequired)
- {
- pParent.Invoke(new Priv_CfuSsd(UpdateCheck.SetTsStatusDirect),
- new object[] { strText });
- }
- else UpdateCheck.SetTsStatusDirect(strText);
- }
- catch(Exception) { Debug.Assert(false); }
- }
-
- public delegate void Priv_CfuSsd(string strText);
-
- private static void SetTsStatusDirect(string strText)
- {
- try { m_tsResultsViewer.Text = strText; }
- catch(Exception) { Debug.Assert(false); }
- }
- } */
-}
diff --git a/Ext/DeprecatedSources/XorredBuffer_111029.cs b/Ext/DeprecatedSources/XorredBuffer_111029.cs
deleted file mode 100644
index 3b16d96..0000000
--- a/Ext/DeprecatedSources/XorredBuffer_111029.cs
+++ /dev/null
@@ -1,196 +0,0 @@
-/*
- KeePass Password Safe - The Open-Source Password Manager
- Copyright (C) 2003-2011 Dominik Reichl <dominik.reichl at t-online.de>
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-*/
-
-using System;
-using System.Diagnostics;
-
-namespace KeePassLib.Security
-{
- /// <summary>
- /// Represents an object that is encrypted using a XOR pad until
- /// it is read. The key XOR pad can be changed without revealing the
- /// protected data in process memory.
- /// </summary>
- public sealed class XorredBuffer
- {
- private byte[] m_pbData = new byte[0]; // Never null
- private byte[] m_pbXorPad = new byte[0]; // Never null
-
- /// <summary>
- /// Length of the protected data in bytes.
- /// </summary>
- public uint Length
- {
- get { return (uint)m_pbData.Length; }
- }
-
- /// <summary>
- /// Construct a new XOR-protected object using a protected byte array
- /// and a XOR pad that decrypts the protected data. The
- /// <paramref name="pbProtectedData" /> byte array must have the same size
- /// as the <paramref name="pbXorPad" /> byte array.
- /// </summary>
- /// <param name="pbProtectedData">Protected data (XOR pad applied).</param>
- /// <param name="pbXorPad">XOR pad that is used to decrypt the
- /// <paramref name="pbData" /> parameter.</param>
- /// <exception cref="System.ArgumentNullException">Thrown if one of the input
- /// parameters is <c>null</c>.</exception>
- /// <exception cref="System.ArgumentException">Thrown if the byte arrays are
- /// of different size.</exception>
- public XorredBuffer(byte[] pbProtectedData, byte[] pbXorPad)
- {
- Debug.Assert(pbProtectedData != null); if(pbProtectedData == null) throw new ArgumentNullException("pbProtectedData");
- Debug.Assert(pbXorPad != null); if(pbXorPad == null) throw new ArgumentNullException("pbXorPad");
-
- Debug.Assert(pbProtectedData.Length == pbXorPad.Length);
- if(pbProtectedData.Length != pbXorPad.Length) throw new ArgumentException();
-
- m_pbData = pbProtectedData;
- m_pbXorPad = pbXorPad;
- }
-
- private void Decrypt()
- {
- Debug.Assert((m_pbData.Length == m_pbXorPad.Length) || (m_pbXorPad.Length == 0));
-
- if(m_pbData.Length == m_pbXorPad.Length)
- {
- for(int i = 0; i < m_pbData.Length; ++i)
- m_pbData[i] ^= m_pbXorPad[i];
-
- m_pbXorPad = new byte[0];
- }
- }
-
- /// <summary>
- /// Decrypt the buffer. The <c>XorredBuffer</c> protection is useless
- /// after you used this method. The object cannot be re-encrypted.
- /// </summary>
- /// <returns>Unprotected plain-text byte array.</returns>
- public byte[] ReadPlainText()
- {
- Decrypt();
- return m_pbData;
- }
-
- /// <summary>
- /// Change the protection key for this <c>XorredBuffer</c> object.
- /// The data will first be decrypted using the old key and then
- /// re-encrypted using the new key. This operation doesn't reveal
- /// the plain-text in the process memory.
- /// </summary>
- /// <param name="pbNewXorPad">New protection pad. Must contain exactly
- /// the same number of bytes as the length of the currently protected data.
- /// Use the <c>Length</c> property of the <c>XorredBuffer</c> to query
- /// the data length and pass a correct number of bytes to <c>ChangeKey</c>.</param>
- /// <returns>New protected data (encrypted using the new XOR pad).</returns>
- /// <exception cref="System.ArgumentNullException">Thrown if the input
- /// parameter is <c>null</c>.</exception>
- /// <exception cref="System.ArgumentException">Thrown if the input
- /// byte array doesn't have the correct size.</exception>
- public byte[] ChangeKey(byte[] pbNewXorPad)
- {
- Debug.Assert(pbNewXorPad != null); if(pbNewXorPad == null) throw new ArgumentNullException("pbNewXorPad");
-
- Debug.Assert(pbNewXorPad.Length == m_pbData.Length);
- if(pbNewXorPad.Length != m_pbData.Length) throw new ArgumentException();
-
- if(m_pbXorPad.Length == m_pbData.Length) // Data is protected
- {
- for(int i = 0; i < m_pbData.Length; ++i)
- m_pbData[i] ^= (byte)(m_pbXorPad[i] ^ pbNewXorPad[i]);
- }
- else // Data is unprotected
- {
- for(int i = 0; i < m_pbData.Length; ++i)
- m_pbData[i] ^= pbNewXorPad[i];
- }
-
- m_pbXorPad = pbNewXorPad;
- return m_pbData;
- }
-
- public bool EqualsValue(XorredBuffer xb)
- {
- if(xb == null) { Debug.Assert(false); throw new ArgumentNullException("xb"); }
-
- if(xb.m_pbData.Length != m_pbData.Length) return false;
-
- bool bDecThis = (m_pbData.Length == m_pbXorPad.Length);
- bool bDecOther = (xb.m_pbData.Length == xb.m_pbXorPad.Length);
- for(int i = 0; i < m_pbData.Length; ++i)
- {
- byte bt1 = m_pbData[i];
- if(bDecThis) bt1 ^= m_pbXorPad[i];
-
- byte bt2 = xb.m_pbData[i];
- if(bDecOther) bt2 ^= xb.m_pbXorPad[i];
-
- if(bt1 != bt2) return false;
- }
-
- return true;
- }
-
- public bool EqualsValue(byte[] pb)
- {
- if(pb == null) { Debug.Assert(false); throw new ArgumentNullException("pb"); }
-
- if(pb.Length != m_pbData.Length) return false;
-
- if(m_pbData.Length == m_pbXorPad.Length)
- {
- for(int i = 0; i < m_pbData.Length; ++i)
- {
- if((byte)(m_pbData[i] ^ m_pbXorPad[i]) != pb[i]) return false;
- }
- return true;
- }
-
- for(int i = 0; i < m_pbData.Length; ++i)
- {
- if(m_pbData[i] != pb[i]) return false;
- }
- return true;
- }
-
- /// <summary>
- /// XOR all bytes in a data buffer with a pad. Both byte arrays must
- /// be of the same size.
- /// </summary>
- /// <param name="pbData">Data to be protected.</param>
- /// <param name="pbPad">XOR pad.</param>
- /// <exception cref="System.ArgumentNullException">Thrown if one of the
- /// parameters is <c>null</c>.</exception>
- /// <exception cref="System.ArgumentException">Thrown if the length of
- /// the data array and the pad aren't equal.</exception>
- [Obsolete("Use MemUtil.XorArray instead.")]
- public static void XorArrays(byte[] pbData, byte[] pbPad)
- {
- Debug.Assert(pbData != null); if(pbData == null) throw new ArgumentNullException("pbData");
- Debug.Assert(pbPad != null); if(pbPad == null) throw new ArgumentNullException("pbPad");
-
- Debug.Assert(pbData.Length == pbPad.Length);
- if(pbData.Length != pbPad.Length) throw new ArgumentException();
-
- for(int i = 0; i < pbData.Length; ++i)
- pbData[i] ^= pbPad[i];
- }
- }
-}
diff --git a/Ext/KeePass.exe.config b/Ext/KeePass.exe.config
index 5f6aca9..f9efb5a 100644
--- a/Ext/KeePass.exe.config
+++ b/Ext/KeePass.exe.config
@@ -10,8 +10,8 @@
<assemblyIdentity name="KeePass"
publicKeyToken="fed2ed7716aecf5c"
culture="neutral" />
- <bindingRedirect oldVersion="2.0.9.0-2.20.0.0"
- newVersion="2.20.0.18622" />
+ <bindingRedirect oldVersion="2.0.9.0-2.20.1.0"
+ newVersion="2.20.1.16631" />
</dependentAssembly>
</assemblyBinding>
<enforceFIPSPolicy enabled="false" />
diff --git a/Ext/KeePass.iss b/Ext/KeePass.iss
index 63fc529..ea6fc95 100644
--- a/Ext/KeePass.iss
+++ b/Ext/KeePass.iss
@@ -8,10 +8,10 @@
#define MyAppNameEx "KeePass Password Safe 2"
#define MyAppPublisher "Dominik Reichl"
-#define KeeVersionStr "2.20"
-#define KeeVersionStrWithMinor "2.20"
-#define KeeVersionStrWithMinorPath "2.20"
-#define KeeVersionWin "2.20.0.0"
+#define KeeVersionStr "2.20.1"
+#define KeeVersionStrWithMinor "2.20.1"
+#define KeeVersionStrWithMinorPath "2.20.1"
+#define KeeVersionWin "2.20.1.0"
#define MyAppURL "http://keepass.info/"
#define MyAppExeName "KeePass.exe"
diff --git a/Ext/KeePassMsi/KeePassMsi.vdproj b/Ext/KeePassMsi/KeePassMsi.vdproj
index 54e1cdb..7df4aa7 100644
--- a/Ext/KeePassMsi/KeePassMsi.vdproj
+++ b/Ext/KeePassMsi/KeePassMsi.vdproj
@@ -382,7 +382,7 @@
{
"AssemblyRegister" = "3:1"
"AssemblyIsInGAC" = "11:FALSE"
- "AssemblyAsmDisplayName" = "8:KeePass, Version=2.20.0.18622, Culture=neutral, PublicKeyToken=fed2ed7716aecf5c, processorArchitecture=MSIL"
+ "AssemblyAsmDisplayName" = "8:KeePass, Version=2.20.1.16631, Culture=neutral, PublicKeyToken=fed2ed7716aecf5c, processorArchitecture=MSIL"
"ScatterAssemblies"
{
"_838987B3C51D42C3C7B9BDA1339A5500"
@@ -413,7 +413,7 @@
{
"AssemblyRegister" = "3:1"
"AssemblyIsInGAC" = "11:FALSE"
- "AssemblyAsmDisplayName" = "8:KeePass.XmlSerializers, Version=2.20.0.18622, Culture=neutral, PublicKeyToken=fed2ed7716aecf5c, processorArchitecture=MSIL"
+ "AssemblyAsmDisplayName" = "8:KeePass.XmlSerializers, Version=2.20.1.16631, Culture=neutral, PublicKeyToken=fed2ed7716aecf5c, processorArchitecture=MSIL"
"ScatterAssemblies"
{
"_8C05ADB649434D7892E36709EBDED4CC"
@@ -564,7 +564,7 @@
{
"AssemblyRegister" = "3:1"
"AssemblyIsInGAC" = "11:FALSE"
- "AssemblyAsmDisplayName" = "8:KeePass, Version=2.20.0.18622, Culture=neutral, PublicKeyToken=fed2ed7716aecf5c, processorArchitecture=MSIL"
+ "AssemblyAsmDisplayName" = "8:KeePass, Version=2.20.1.16631, Culture=neutral, PublicKeyToken=fed2ed7716aecf5c, processorArchitecture=MSIL"
"ScatterAssemblies"
{
"_C4F8814F844C43EE8C9F5B662182B11A"
@@ -712,14 +712,14 @@
{
"Name" = "8:Microsoft Visual Studio"
"ProductName" = "8:KeePass"
- "ProductCode" = "8:{F6B49374-09A3-4B84-BA45-1CA2CD1C793F}"
- "PackageCode" = "8:{72EA3387-C9B6-433D-B670-E84AEC1CF35C}"
+ "ProductCode" = "8:{798C312A-7893-46A2-A269-D3176F13D060}"
+ "PackageCode" = "8:{F4690AAC-FA26-488E-A4EE-5FAFE81E56DA}"
"UpgradeCode" = "8:{F2F19898-4F86-4940-9BFA-426574CE03E1}"
"RestartWWWService" = "11:FALSE"
"RemovePreviousVersions" = "11:TRUE"
"DetectNewerInstalledVersion" = "11:TRUE"
"InstallAllUsers" = "11:TRUE"
- "ProductVersion" = "8:2.20.0"
+ "ProductVersion" = "8:2.20.1"
"Manufacturer" = "8:Dominik Reichl"
"ARPHELPTELEPHONE" = "8:"
"ARPHELPLINK" = "8:http://keepass.info/"
diff --git a/KeePass/Native/NativeMethods.Unix.cs b/KeePass/Native/NativeMethods.Unix.cs
index 8544892..11a0c6e 100644
--- a/KeePass/Native/NativeMethods.Unix.cs
+++ b/KeePass/Native/NativeMethods.Unix.cs
@@ -175,6 +175,12 @@ namespace KeePass.Native
{
if(f == null) { Debug.Assert(false); return; }
+ // The following crashes under Mac OS X (SIGSEGV in native code,
+ // not just an exception), thus skip it when we're on Mac OS X
+ // https://sourceforge.net/projects/keepass/forums/forum/329221/topic/5860588
+ if(KeeNativeLib.NativeLib.GetPlatformID() == PlatformID.MacOSX)
+ return;
+
try
{
Type tXplatUIX11 = GetXplatUIX11Type(true);
diff --git a/KeePass/Plugins/PlgxCache.cs b/KeePass/Plugins/PlgxCache.cs
index fa6acf2..c554ef9 100644
--- a/KeePass/Plugins/PlgxCache.cs
+++ b/KeePass/Plugins/PlgxCache.cs
@@ -114,7 +114,7 @@ namespace KeePass.Plugins
// if(di.DriveType == DriveType.Network)
// {
// strDataDir = UrlUtil.EnsureTerminatingSeparator(
- // Path.GetTempPath(), false);
+ // UrlUtil.GetTempPath(), false);
// strDataDir = strDataDir.Substring(0, strDataDir.Length - 1);
// }
// }
diff --git a/KeePass/Plugins/PlgxPlugin.cs b/KeePass/Plugins/PlgxPlugin.cs
index 6345912..578bfc5 100644
--- a/KeePass/Plugins/PlgxPlugin.cs
+++ b/KeePass/Plugins/PlgxPlugin.cs
@@ -266,7 +266,7 @@ namespace KeePass.Plugins
private static string CreateTempDirectory()
{
- string strTmpRoot = Path.GetTempPath();
+ string strTmpRoot = UrlUtil.GetTempPath();
strTmpRoot = UrlUtil.EnsureTerminatingSeparator(strTmpRoot, false);
strTmpRoot += (new PwUuid(true)).ToHexString();
diff --git a/KeePass/Program.cs b/KeePass/Program.cs
index a41b7a9..4c573c1 100644
--- a/KeePass/Program.cs
+++ b/KeePass/Program.cs
@@ -284,7 +284,7 @@ namespace KeePass
try
{
string strFileOut = UrlUtil.EnsureTerminatingSeparator(
- Path.GetTempPath(), false) + "KeePass_UrlOverride.tmp";
+ UrlUtil.GetTempPath(), false) + "KeePass_UrlOverride.tmp";
string strContent = ("[KeePass]\r\nKeeURLOverride=" +
Program.Config.Integration.UrlOverride + "\r\n");
File.WriteAllText(strFileOut, strContent);
diff --git a/KeePass/Properties/AssemblyInfo.cs b/KeePass/Properties/AssemblyInfo.cs
index 03f753b..9712ee7 100644
--- a/KeePass/Properties/AssemblyInfo.cs
+++ b/KeePass/Properties/AssemblyInfo.cs
@@ -38,5 +38,5 @@ using System.Runtime.InteropServices;
[assembly: Guid("02020c52-c0da-47c0-9f3f-a6fe76cee400")]
// Assembly version information
-[assembly: AssemblyVersion("2.20.0.*")]
-[assembly: AssemblyFileVersion("2.20.0.0")]
+[assembly: AssemblyVersion("2.20.1.*")]
+[assembly: AssemblyFileVersion("2.20.1.0")]
diff --git a/KeePass/Resources/Nuvola_Derived/B16x16_DeleteEntry.png b/KeePass/Resources/Nuvola_Derived/B16x16_DeleteEntry.png
index cf9dea0..8cff343 100644
Binary files a/KeePass/Resources/Nuvola_Derived/B16x16_DeleteEntry.png and b/KeePass/Resources/Nuvola_Derived/B16x16_DeleteEntry.png differ
diff --git a/KeePass/Resources/Nuvola_Derived/B16x16_EditCopyLink.png b/KeePass/Resources/Nuvola_Derived/B16x16_EditCopyLink.png
index 731f611..fff5000 100644
Binary files a/KeePass/Resources/Nuvola_Derived/B16x16_EditCopyLink.png and b/KeePass/Resources/Nuvola_Derived/B16x16_EditCopyLink.png differ
diff --git a/KeePass/Resources/Nuvola_Derived/B16x16_FileSave_Disabled.png b/KeePass/Resources/Nuvola_Derived/B16x16_FileSave_Disabled.png
index 52c99f6..9727a0b 100644
Binary files a/KeePass/Resources/Nuvola_Derived/B16x16_FileSave_Disabled.png and b/KeePass/Resources/Nuvola_Derived/B16x16_FileSave_Disabled.png differ
diff --git a/KeePass/Resources/Nuvola_Derived/B16x16_File_Close.png b/KeePass/Resources/Nuvola_Derived/B16x16_File_Close.png
index 20394a6..4818ef4 100644
Binary files a/KeePass/Resources/Nuvola_Derived/B16x16_File_Close.png and b/KeePass/Resources/Nuvola_Derived/B16x16_File_Close.png differ
diff --git a/KeePass/Resources/Nuvola_Derived/B16x16_File_SaveAll.png b/KeePass/Resources/Nuvola_Derived/B16x16_File_SaveAll.png
index e9baa39..b34b1dd 100644
Binary files a/KeePass/Resources/Nuvola_Derived/B16x16_File_SaveAll.png and b/KeePass/Resources/Nuvola_Derived/B16x16_File_SaveAll.png differ
diff --git a/KeePass/Resources/Nuvola_Derived/B16x16_File_SaveAll_Disabled.png b/KeePass/Resources/Nuvola_Derived/B16x16_File_SaveAll_Disabled.png
index 3c8bc37..9fe7e0a 100644
Binary files a/KeePass/Resources/Nuvola_Derived/B16x16_File_SaveAll_Disabled.png and b/KeePass/Resources/Nuvola_Derived/B16x16_File_SaveAll_Disabled.png differ
diff --git a/KeePass/Resources/Nuvola_Derived/B16x16_Key_New.png b/KeePass/Resources/Nuvola_Derived/B16x16_Key_New.png
index de21b88..fb4f54e 100644
Binary files a/KeePass/Resources/Nuvola_Derived/B16x16_Key_New.png and b/KeePass/Resources/Nuvola_Derived/B16x16_Key_New.png differ
diff --git a/KeePass/Resources/Nuvola_Derived/B16x16_Window_2Horz1Vert.png b/KeePass/Resources/Nuvola_Derived/B16x16_Window_2Horz1Vert.png
index 8ffb889..26f7b73 100644
Binary files a/KeePass/Resources/Nuvola_Derived/B16x16_Window_2Horz1Vert.png and b/KeePass/Resources/Nuvola_Derived/B16x16_Window_2Horz1Vert.png differ
diff --git a/KeePass/Resources/Nuvola_Derived/B16x16_Window_3Horz.png b/KeePass/Resources/Nuvola_Derived/B16x16_Window_3Horz.png
index d46201a..cd9e3bc 100644
Binary files a/KeePass/Resources/Nuvola_Derived/B16x16_Window_3Horz.png and b/KeePass/Resources/Nuvola_Derived/B16x16_Window_3Horz.png differ
diff --git a/KeePass/UI/OpenWithMenu.cs b/KeePass/UI/OpenWithMenu.cs
index b14d6bd..36b5ecb 100644
--- a/KeePass/UI/OpenWithMenu.cs
+++ b/KeePass/UI/OpenWithMenu.cs
@@ -238,9 +238,12 @@ namespace KeePass.UI
if(NativeLib.IsUnix())
{
AddAppByFile(AppLocator.FindAppUnix("epiphany-browser"), @"&Epiphany");
- AddAppByFile(AppLocator.FindAppUnix("arora"), @"&Arora");
AddAppByFile(AppLocator.FindAppUnix("galeon"), @"Ga&leon");
AddAppByFile(AppLocator.FindAppUnix("konqueror"), @"&Konqueror");
+ AddAppByFile(AppLocator.FindAppUnix("rekonq"), @"&Rekonq");
+ AddAppByFile(AppLocator.FindAppUnix("arora"), @"&Arora");
+ AddAppByFile(AppLocator.FindAppUnix("midori"), @"&Midori");
+ AddAppByFile(AppLocator.FindAppUnix("Dooble"), @"&Dooble"); // Upper-case
}
}
@@ -254,22 +257,22 @@ namespace KeePass.UI
private void FindAppsByRegistryPriv(string strRootSubKey)
{
- RegistryKey kRoot = Registry.LocalMachine.OpenSubKey(strRootSubKey);
+ RegistryKey kRoot = Registry.LocalMachine.OpenSubKey(strRootSubKey, false);
if(kRoot == null) return; // No assert, key might not exist
string[] vAppSubKeys = kRoot.GetSubKeyNames();
foreach(string strAppSubKey in vAppSubKeys)
{
- RegistryKey kApp = kRoot.OpenSubKey(strAppSubKey);
+ RegistryKey kApp = kRoot.OpenSubKey(strAppSubKey, false);
string strName = (kApp.GetValue(string.Empty) as string);
string strAltName = null;
- RegistryKey kCmd = kApp.OpenSubKey("shell\\open\\command");
+ RegistryKey kCmd = kApp.OpenSubKey("shell\\open\\command", false);
if(kCmd == null) { Debug.Assert(false); kApp.Close(); continue; }
string strCmdLine = (kCmd.GetValue(string.Empty) as string);
kCmd.Close();
- RegistryKey kCaps = kApp.OpenSubKey("Capabilities");
+ RegistryKey kCaps = kApp.OpenSubKey("Capabilities", false);
if(kCaps != null)
{
strAltName = (kCaps.GetValue("ApplicationName") as string);
diff --git a/KeePass/Util/AppLocator.cs b/KeePass/Util/AppLocator.cs
index 0b7c26b..7abc71b 100644
--- a/KeePass/Util/AppLocator.cs
+++ b/KeePass/Util/AppLocator.cs
@@ -76,7 +76,11 @@ namespace KeePass.Util
string strPath;
if(m_dictPaths.TryGetValue(iBrwID, out strPath)) return strPath;
- try { strPath = f(); }
+ try
+ {
+ strPath = f();
+ if((strPath != null) && (strPath.Length == 0)) strPath = null;
+ }
catch(Exception) { strPath = null; }
m_dictPaths[iBrwID] = strPath;
@@ -120,14 +124,12 @@ namespace KeePass.Util
private static string FindInternetExplorer()
{
- RegistryKey kApps = Registry.ClassesRoot.OpenSubKey("Applications", false);
- RegistryKey kIE = kApps.OpenSubKey("iexplore.exe", false);
- RegistryKey kShell = kIE.OpenSubKey("shell", false);
- RegistryKey kOpen = kShell.OpenSubKey("open", false);
- RegistryKey kCommand = kOpen.OpenSubKey("command", false);
- string strPath = (kCommand.GetValue(string.Empty) as string);
+ RegistryKey kCommand = Registry.ClassesRoot.OpenSubKey(
+ "Applications\\iexplore.exe\\shell\\open\\command", false);
+ if(kCommand == null) return null;
- if(strPath != null)
+ string strPath = (kCommand.GetValue(string.Empty) as string);
+ if(!string.IsNullOrEmpty(strPath))
{
strPath = strPath.Trim();
strPath = UrlUtil.GetQuotedAppPath(strPath).Trim();
@@ -135,10 +137,6 @@ namespace KeePass.Util
else { Debug.Assert(false); }
kCommand.Close();
- kOpen.Close();
- kShell.Close();
- kIE.Close();
- kApps.Close();
return strPath;
}
@@ -158,28 +156,28 @@ namespace KeePass.Util
private static string FindFirefoxPr(bool bWowNode)
{
- RegistryKey kSoftware = Registry.LocalMachine.OpenSubKey("SOFTWARE", false);
-
- RegistryKey kWow = (bWowNode ? kSoftware.OpenSubKey("Wow6432Node", false) : null);
-
- RegistryKey kMozilla = (kWow ?? kSoftware).OpenSubKey("Mozilla", false);
- RegistryKey kFirefox = kMozilla.OpenSubKey("Mozilla Firefox", false);
+ RegistryKey kFirefox = Registry.LocalMachine.OpenSubKey(bWowNode ?
+ "SOFTWARE\\Wow6432Node\\Mozilla\\Mozilla Firefox" :
+ "SOFTWARE\\Mozilla\\Mozilla Firefox", false);
+ if(kFirefox == null) return null;
string strCurVer = (kFirefox.GetValue("CurrentVersion") as string);
- if((strCurVer == null) || (strCurVer.Length == 0))
+ if(string.IsNullOrEmpty(strCurVer))
{
kFirefox.Close();
- kMozilla.Close();
- if(kWow != null) kWow.Close();
- kSoftware.Close();
return null;
}
- RegistryKey kCurVer = kFirefox.OpenSubKey(strCurVer);
- RegistryKey kMain = kCurVer.OpenSubKey("Main");
+ RegistryKey kMain = kFirefox.OpenSubKey(strCurVer + "\\Main", false);
+ if(kMain == null)
+ {
+ Debug.Assert(false);
+ kFirefox.Close();
+ return null;
+ }
string strPath = (kMain.GetValue("PathToExe") as string);
- if(strPath != null)
+ if(!string.IsNullOrEmpty(strPath))
{
strPath = strPath.Trim();
strPath = UrlUtil.GetQuotedAppPath(strPath).Trim();
@@ -187,11 +185,7 @@ namespace KeePass.Util
else { Debug.Assert(false); }
kMain.Close();
- kCurVer.Close();
kFirefox.Close();
- kMozilla.Close();
- if(kWow != null) kWow.Close();
- kSoftware.Close();
return strPath;
}
@@ -199,27 +193,22 @@ namespace KeePass.Util
{
if(NativeLib.IsUnix()) return FindAppUnix("opera");
- RegistryKey kHtml = Registry.ClassesRoot.OpenSubKey("Opera.HTML", false);
- RegistryKey kShell = kHtml.OpenSubKey("shell", false);
- RegistryKey kOpen = kShell.OpenSubKey("open", false);
- RegistryKey kCommand = kOpen.OpenSubKey("command", false);
- string strPath = (kCommand.GetValue(string.Empty) as string);
+ RegistryKey kCommand = Registry.ClassesRoot.OpenSubKey(
+ "Opera.HTML\\shell\\open\\command", false);
+ if(kCommand == null) return null;
- if((strPath != null) && (strPath.Length > 0))
+ string strPath = (kCommand.GetValue(string.Empty) as string);
+ if(!string.IsNullOrEmpty(strPath))
{
strPath = strPath.Trim();
strPath = UrlUtil.GetQuotedAppPath(strPath).Trim();
}
- else strPath = null;
+ else { Debug.Assert(false); }
kCommand.Close();
- kOpen.Close();
- kShell.Close();
- kHtml.Close();
return strPath;
}
- // HKEY_CLASSES_ROOT\\ChromeHTML\\shell\\open\\command
private static string FindChrome()
{
if(NativeLib.IsUnix())
@@ -229,60 +218,80 @@ namespace KeePass.Util
return FindAppUnix("chromium-browser");
}
+ string strPath = FindChromeNew();
+ if(string.IsNullOrEmpty(strPath))
+ strPath = FindChromeOld();
+ return strPath;
+ }
+
+ // HKEY_CLASSES_ROOT\\ChromeHTML[.ID]\\shell\\open\\command
+ private static string FindChromeNew()
+ {
RegistryKey kHtml = Registry.ClassesRoot.OpenSubKey("ChromeHTML", false);
- RegistryKey kShell = kHtml.OpenSubKey("shell", false);
- RegistryKey kOpen = kShell.OpenSubKey("open", false);
- RegistryKey kCommand = kOpen.OpenSubKey("command", false);
- string strPath = (kCommand.GetValue(string.Empty) as string);
+ if(kHtml == null) // New versions append an ID
+ {
+ string[] vKeys = Registry.ClassesRoot.GetSubKeyNames();
+ foreach(string strEnum in vKeys)
+ {
+ if(strEnum.StartsWith("ChromeHTML.", StrUtil.CaseIgnoreCmp))
+ {
+ kHtml = Registry.ClassesRoot.OpenSubKey(strEnum, false);
+ break;
+ }
+ }
+
+ if(kHtml == null) return null;
+ }
+
+ RegistryKey kCommand = kHtml.OpenSubKey("shell\\open\\command", false);
+ if(kCommand == null)
+ {
+ Debug.Assert(false);
+ kHtml.Close();
+ return null;
+ }
+ string strPath = (kCommand.GetValue(string.Empty) as string);
if(!string.IsNullOrEmpty(strPath))
{
strPath = strPath.Trim();
strPath = UrlUtil.GetQuotedAppPath(strPath).Trim();
}
- else strPath = null;
+ else { Debug.Assert(false); }
kCommand.Close();
- kOpen.Close();
- kShell.Close();
kHtml.Close();
- return (strPath ?? FindChromeOld());
+ return strPath;
}
// HKEY_CLASSES_ROOT\\Applications\\chrome.exe\\shell\\open\\command
private static string FindChromeOld()
{
- RegistryKey kApps = Registry.ClassesRoot.OpenSubKey("Applications", false);
- RegistryKey kExe = kApps.OpenSubKey("chrome.exe", false);
- RegistryKey kShell = kExe.OpenSubKey("shell", false);
- RegistryKey kOpen = kShell.OpenSubKey("open", false);
- RegistryKey kCommand = kOpen.OpenSubKey("command", false);
- string strPath = (kCommand.GetValue(string.Empty) as string);
+ RegistryKey kCommand = Registry.ClassesRoot.OpenSubKey(
+ "Applications\\chrome.exe\\shell\\open\\command", false);
+ if(kCommand == null) return null;
+ string strPath = (kCommand.GetValue(string.Empty) as string);
if(!string.IsNullOrEmpty(strPath))
{
strPath = strPath.Trim();
strPath = UrlUtil.GetQuotedAppPath(strPath).Trim();
}
- else strPath = null;
+ else { Debug.Assert(false); }
kCommand.Close();
- kOpen.Close();
- kShell.Close();
- kExe.Close();
- kApps.Close();
return strPath;
}
// HKEY_LOCAL_MACHINE\\SOFTWARE\\Apple Computer, Inc.\\Safari\\BrowserExe
private static string FindSafari()
{
- RegistryKey kSoftware = Registry.LocalMachine.OpenSubKey("SOFTWARE", false);
- RegistryKey kApple = kSoftware.OpenSubKey("Apple Computer, Inc.", false);
- RegistryKey kSafari = kApple.OpenSubKey("Safari", false);
- string strPath = (kSafari.GetValue("BrowserExe") as string);
+ RegistryKey kSafari = Registry.LocalMachine.OpenSubKey(
+ "SOFTWARE\\Apple Computer, Inc.\\Safari", false);
+ if(kSafari == null) return null;
- if(strPath != null)
+ string strPath = (kSafari.GetValue("BrowserExe") as string);
+ if(!string.IsNullOrEmpty(strPath))
{
strPath = strPath.Trim();
strPath = UrlUtil.GetQuotedAppPath(strPath).Trim();
@@ -290,8 +299,6 @@ namespace KeePass.Util
else { Debug.Assert(false); }
kSafari.Close();
- kApple.Close();
- kSoftware.Close();
return strPath;
}
diff --git a/KeePass/Util/GlobalMutexPool.cs b/KeePass/Util/GlobalMutexPool.cs
index 43964a8..8bf1813 100644
--- a/KeePass/Util/GlobalMutexPool.cs
+++ b/KeePass/Util/GlobalMutexPool.cs
@@ -201,7 +201,8 @@ namespace KeePass.Util
private static string GetMutexPath(string strName)
{
- string strDir = UrlUtil.EnsureTerminatingSeparator(Path.GetTempPath(), false);
+ string strDir = UrlUtil.EnsureTerminatingSeparator(
+ UrlUtil.GetTempPath(), false);
return (strDir + IpcUtilEx.IpcMsgFilePreID + IpcBroadcast.GetUserID() +
"-Mutex-" + strName + ".tmp");
}
diff --git a/KeePass/Util/IpcBroadcast.Fsw.cs b/KeePass/Util/IpcBroadcast.Fsw.cs
index 6aed17b..f7ba4e4 100644
--- a/KeePass/Util/IpcBroadcast.Fsw.cs
+++ b/KeePass/Util/IpcBroadcast.Fsw.cs
@@ -49,7 +49,8 @@ namespace KeePass.Util
{
if(m_strMsgFilePath != null) return;
- string strDir = UrlUtil.EnsureTerminatingSeparator(Path.GetTempPath(), false);
+ string strDir = UrlUtil.EnsureTerminatingSeparator(
+ UrlUtil.GetTempPath(), false);
m_strMsgFileName = IpcUtilEx.IpcMsgFilePreID + GetUserID() +
IpcUtilEx.IpcMsgFilePostID;
m_strMsgFilePath = strDir + m_strMsgFileName;
@@ -109,7 +110,7 @@ namespace KeePass.Util
{
FswEnsurePaths();
- m_fsw = new FileSystemWatcher(Path.GetTempPath(), m_strMsgFileName);
+ m_fsw = new FileSystemWatcher(UrlUtil.GetTempPath(), m_strMsgFileName);
m_fsw.IncludeSubdirectories = false;
m_fsw.NotifyFilter = (NotifyFilters.CreationTime | NotifyFilters.LastWrite);
diff --git a/KeePass/Util/IpcUtilEx.cs b/KeePass/Util/IpcUtilEx.cs
index 247a111..3953c5a 100644
--- a/KeePass/Util/IpcUtilEx.cs
+++ b/KeePass/Util/IpcUtilEx.cs
@@ -115,7 +115,7 @@ namespace KeePass.Util
{
try
{
- string str = Path.GetTempPath();
+ string str = UrlUtil.GetTempPath();
str = UrlUtil.EnsureTerminatingSeparator(str, false);
return (str + IpcMsgFilePreID + nId.ToString() + ".tmp");
diff --git a/KeePass/Util/SessionLockNotifier.cs b/KeePass/Util/SessionLockNotifier.cs
index 276b3ef..b66f7ac 100644
--- a/KeePass/Util/SessionLockNotifier.cs
+++ b/KeePass/Util/SessionLockNotifier.cs
@@ -114,7 +114,9 @@ namespace KeePass.Util
r = SessionLockReason.Lock;
else if(e.Reason == SessionSwitchReason.SessionLogoff)
r = SessionLockReason.Ending;
- else if(e.Reason == SessionSwitchReason.SessionRemoteControl)
+ else if((e.Reason == SessionSwitchReason.SessionRemoteControl) ||
+ (e.Reason == SessionSwitchReason.RemoteConnect) ||
+ (e.Reason == SessionSwitchReason.RemoteDisconnect))
r = SessionLockReason.RemoteControlChange;
if(r != SessionLockReason.Unknown)
diff --git a/KeePass/Util/ShellUtil.cs b/KeePass/Util/ShellUtil.cs
index 6f6674a..17dac7c 100644
--- a/KeePass/Util/ShellUtil.cs
+++ b/KeePass/Util/ShellUtil.cs
@@ -46,8 +46,8 @@ namespace KeePass.Util
try { kClassesRoot.CreateSubKey("." + strFileExt); }
catch(Exception) { }
RegistryKey kFileExt = kClassesRoot.OpenSubKey("." + strFileExt, true);
-
kFileExt.SetValue(string.Empty, strExtId, RegistryValueKind.String);
+ kFileExt.Close();
try { kClassesRoot.CreateSubKey(strExtId); }
catch(Exception) { }
@@ -58,11 +58,11 @@ namespace KeePass.Util
try { kExtInfo.CreateSubKey("DefaultIcon"); }
catch(Exception) { }
RegistryKey kIcon = kExtInfo.OpenSubKey("DefaultIcon", true);
-
if(strAppPath.IndexOfAny(new char[]{ ' ', '\t' }) < 0)
kIcon.SetValue(string.Empty, strAppPath + ",0", RegistryValueKind.String);
else
kIcon.SetValue(string.Empty, "\"" + strAppPath + "\",0", RegistryValueKind.String);
+ kIcon.Close();
try { kExtInfo.CreateSubKey("shell"); }
catch(Exception) { }
@@ -77,8 +77,12 @@ namespace KeePass.Util
try { kShellOpen.CreateSubKey("command"); }
catch(Exception) { }
RegistryKey kShellCommand = kShellOpen.OpenSubKey("command", true);
-
kShellCommand.SetValue(string.Empty, "\"" + strAppPath + "\" \"%1\"", RegistryValueKind.String);
+ kShellCommand.Close();
+
+ kShellOpen.Close();
+ kShell.Close();
+ kExtInfo.Close();
ShChangeNotify();
@@ -128,6 +132,7 @@ namespace KeePass.Util
{
RegistryKey kRun = Registry.CurrentUser.OpenSubKey(AutoRunKey, true);
kRun.DeleteValue(strAppName);
+ kRun.Close();
}
}
catch(Exception) { Debug.Assert(false); }
@@ -138,8 +143,8 @@ namespace KeePass.Util
try
{
string strNotFound = Guid.NewGuid().ToString();
- string strResult = Registry.GetValue("HKEY_CURRENT_USER\\" + AutoRunKey,
- strAppName, strNotFound) as string;
+ string strResult = (Registry.GetValue("HKEY_CURRENT_USER\\" + AutoRunKey,
+ strAppName, strNotFound) as string);
if((strResult != null) && (strResult != strNotFound) &&
(strResult.Length > 0))
@@ -171,6 +176,7 @@ namespace KeePass.Util
{
RegistryKey kRun = Registry.LocalMachine.OpenSubKey(PreLoadKey, true);
kRun.DeleteValue(strAppName);
+ kRun.Close();
}
}
catch(Exception) { Debug.Assert(false); }
diff --git a/KeePass/Util/TempFilesPool.cs b/KeePass/Util/TempFilesPool.cs
index 9cc9e5b..97784bc 100644
--- a/KeePass/Util/TempFilesPool.cs
+++ b/KeePass/Util/TempFilesPool.cs
@@ -76,7 +76,7 @@ namespace KeePass.Util
public string GetTempFileName()
{
- return this.GetTempFileName(true);
+ return GetTempFileName(true);
}
public string GetTempFileName(bool bCreateEmptyFile)
diff --git a/KeePass/Util/WinUtil.cs b/KeePass/Util/WinUtil.cs
index d068296..8e944e8 100644
--- a/KeePass/Util/WinUtil.cs
+++ b/KeePass/Util/WinUtil.cs
@@ -379,7 +379,7 @@ namespace KeePass.Util
char chCur = char.ToUpper(strCur[0]);
if(chPar != chCur) return string.Empty;
- string strTemp = Path.GetTempPath();
+ string strTemp = UrlUtil.GetTempPath();
WinUtil.SetWorkingDirectory(strTemp);
return strCur;
diff --git a/KeePassLib/Native/NativeMethods.cs b/KeePassLib/Native/NativeMethods.cs
index 87170bd..41bbd2e 100644
--- a/KeePassLib/Native/NativeMethods.cs
+++ b/KeePassLib/Native/NativeMethods.cs
@@ -21,6 +21,10 @@ using System;
using System.Text;
using System.Security;
using System.Runtime.InteropServices;
+using System.IO;
+using System.Diagnostics;
+
+using KeePassLib.Utility;
namespace KeePassLib.Native
{
@@ -150,5 +154,26 @@ namespace KeePassLib.Native
return StrCmpLogicalW(x, y);
#endif
}
+
+ internal static string GetUserRuntimeDir()
+ {
+#if !KeePassLibSD
+ string strRtDir = Environment.GetEnvironmentVariable("XDG_RUNTIME_DIR");
+ if(string.IsNullOrEmpty(strRtDir))
+ strRtDir = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData);
+ if(string.IsNullOrEmpty(strRtDir))
+ {
+ Debug.Assert(false);
+ return Path.GetTempPath(); // Not UrlUtil (otherwise cyclic)
+ }
+
+ strRtDir = UrlUtil.EnsureTerminatingSeparator(strRtDir, false);
+ strRtDir += PwDefs.ShortProductName;
+
+ return strRtDir;
+#else
+ return Path.GetTempPath();
+#endif
+ }
}
}
diff --git a/KeePassLib/Properties/AssemblyInfo.cs b/KeePassLib/Properties/AssemblyInfo.cs
index 2fe2c41..a506eb0 100644
--- a/KeePassLib/Properties/AssemblyInfo.cs
+++ b/KeePassLib/Properties/AssemblyInfo.cs
@@ -38,5 +38,5 @@ using System.Runtime.InteropServices;
[assembly: Guid("395f6eec-a1e0-4438-aa82-b75099348134")]
// Assembly version information
-[assembly: AssemblyVersion("2.20.0.*")]
-[assembly: AssemblyFileVersion("2.20.0.0")]
+[assembly: AssemblyVersion("2.20.1.*")]
+[assembly: AssemblyFileVersion("2.20.1.0")]
diff --git a/KeePassLib/PwDefs.cs b/KeePassLib/PwDefs.cs
index d165d4b..3766103 100644
--- a/KeePassLib/PwDefs.cs
+++ b/KeePassLib/PwDefs.cs
@@ -54,18 +54,18 @@ namespace KeePassLib
/// e.g. 2.19 = 0x02130000.
/// It is highly recommended to use <c>FileVersion64</c> instead.
/// </summary>
- public const uint Version32 = 0x02140000;
+ public const uint Version32 = 0x02140100;
/// <summary>
/// Version, encoded as 64-bit unsigned integer
/// (component-wise, 16 bits per component).
/// </summary>
- public const ulong FileVersion64 = 0x0002001400000000UL;
+ public const ulong FileVersion64 = 0x0002001400010000UL;
/// <summary>
/// Version, encoded as string.
/// </summary>
- public const string VersionString = "2.20";
+ public const string VersionString = "2.20.1";
public const string Copyright = @"Copyright © 2003-2012 Dominik Reichl";
diff --git a/KeePassLib/Utility/AppLogEx.cs b/KeePassLib/Utility/AppLogEx.cs
index c4d3afa..b1353e5 100644
--- a/KeePassLib/Utility/AppLogEx.cs
+++ b/KeePassLib/Utility/AppLogEx.cs
@@ -51,7 +51,7 @@ namespace KeePassLib.Utility
string strDirSep = string.Empty;
strDirSep += Path.DirectorySeparatorChar;
- string strTemp = Path.GetTempPath();
+ string strTemp = UrlUtil.GetTempPath();
if(!strTemp.EndsWith(strDirSep))
strTemp += strDirSep;
diff --git a/KeePassLib/Utility/GfxUtil.cs b/KeePassLib/Utility/GfxUtil.cs
index cbccc72..61cd8a4 100644
--- a/KeePassLib/Utility/GfxUtil.cs
+++ b/KeePassLib/Utility/GfxUtil.cs
@@ -54,20 +54,28 @@ namespace KeePassLib.Utility
{
#if !KeePassLibSD
imgSrc = Image.FromStream(s);
- Image img = new Bitmap(imgSrc.Width, imgSrc.Height,
+ Bitmap bmp = new Bitmap(imgSrc.Width, imgSrc.Height,
PixelFormat.Format32bppArgb);
+
+ try
+ {
+ bmp.SetResolution(imgSrc.HorizontalResolution,
+ imgSrc.VerticalResolution);
+ Debug.Assert(bmp.Size == imgSrc.Size);
+ }
+ catch(Exception) { Debug.Assert(false); }
#else
imgSrc = new Bitmap(s);
- Image img = new Bitmap(imgSrc.Width, imgSrc.Height);
+ Bitmap bmp = new Bitmap(imgSrc.Width, imgSrc.Height);
#endif
- using(Graphics g = Graphics.FromImage(img))
+ using(Graphics g = Graphics.FromImage(bmp))
{
g.Clear(Color.Transparent);
g.DrawImage(imgSrc, 0, 0);
}
- return img;
+ return bmp;
}
finally { if(imgSrc != null) imgSrc.Dispose(); }
}
diff --git a/KeePassLib/Utility/UrlUtil.cs b/KeePassLib/Utility/UrlUtil.cs
index 5d01cfd..178c081 100644
--- a/KeePassLib/Utility/UrlUtil.cs
+++ b/KeePassLib/Utility/UrlUtil.cs
@@ -20,9 +20,9 @@
using System;
using System.Collections.Generic;
using System.IO;
-using System.Diagnostics;
using System.Runtime.InteropServices;
using System.Text;
+using System.Diagnostics;
using KeePassLib.Native;
@@ -588,5 +588,22 @@ namespace KeePassLib.Utility
return false;
}
+
+ public static string GetTempPath()
+ {
+ string strDir;
+ if(NativeLib.IsUnix())
+ strDir = NativeMethods.GetUserRuntimeDir();
+ else strDir = Path.GetTempPath();
+
+ try
+ {
+ if(Directory.Exists(strDir) == false)
+ Directory.CreateDirectory(strDir);
+ }
+ catch(Exception) { Debug.Assert(false); }
+
+ return strDir;
+ }
}
}
diff --git a/KeePassLibSD/Properties/AssemblyInfo.cs b/KeePassLibSD/Properties/AssemblyInfo.cs
index 5cd83ff..47ffb10 100644
--- a/KeePassLibSD/Properties/AssemblyInfo.cs
+++ b/KeePassLibSD/Properties/AssemblyInfo.cs
@@ -38,4 +38,4 @@ using System.Runtime.InteropServices;
[assembly: Guid("1d3c6f10-e10b-47be-a2f1-af2562d7d470")]
// Assembly version information
-[assembly: AssemblyVersion("2.20.0.*")]
+[assembly: AssemblyVersion("2.20.1.*")]
diff --git a/ShInstUtil/ShInstUtil.rc b/ShInstUtil/ShInstUtil.rc
index 31cfe29..97955d5 100644
--- a/ShInstUtil/ShInstUtil.rc
+++ b/ShInstUtil/ShInstUtil.rc
@@ -65,8 +65,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
//
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 2,20,0,0
- PRODUCTVERSION 2,20,0,0
+ FILEVERSION 2,20,1,0
+ PRODUCTVERSION 2,20,1,0
FILEFLAGSMASK 0x17L
#ifdef _DEBUG
FILEFLAGS 0x1L
@@ -83,12 +83,12 @@ BEGIN
BEGIN
VALUE "CompanyName", "Dominik Reichl"
VALUE "FileDescription", "ShInstUtil - KeePass Helper Utility"
- VALUE "FileVersion", "2, 20, 0, 0"
+ VALUE "FileVersion", "2, 20, 1, 0"
VALUE "InternalName", "ShInstUtil"
VALUE "LegalCopyright", "Copyright (c) 2007-2012 Dominik Reichl"
VALUE "OriginalFilename", "ShInstUtil.exe"
VALUE "ProductName", "ShInstUtil - KeePass Helper Utility"
- VALUE "ProductVersion", "2, 20, 0, 0"
+ VALUE "ProductVersion", "2, 20, 1, 0"
END
END
BLOCK "VarFileInfo"
diff --git a/Translation/TrlUtil/Properties/AssemblyInfo.cs b/Translation/TrlUtil/Properties/AssemblyInfo.cs
index e45e4fa..51a3108 100644
--- a/Translation/TrlUtil/Properties/AssemblyInfo.cs
+++ b/Translation/TrlUtil/Properties/AssemblyInfo.cs
@@ -38,5 +38,5 @@ using System.Runtime.InteropServices;
[assembly: Guid("39aa6f93-a1c9-497f-bad2-cc42a61d5710")]
// Assembly version information
-[assembly: AssemblyVersion("2.20.0.*")]
-[assembly: AssemblyFileVersion("2.20.0.0")]
+[assembly: AssemblyVersion("2.20.1.*")]
+[assembly: AssemblyFileVersion("2.20.1.0")]
--
keepass2
More information about the Pkg-cli-apps-commits
mailing list