Click here to Skip to main content
15,885,914 members
Articles / Desktop Programming / MFC

Exile 1.8 - The Password Manager

Rate me:
Please Sign up or sign in to vote.
4.57/5 (51 votes)
6 Mar 20058 min read 255.2K   7.4K   111  
Yet another password manager.
/********************************************************************
	Created:	1/4/2004, 16:09
	File name: 	D:\Projects\Exile\Exile\predefined.h
	File path:	D:\Projects\Exile\Exile
	File base:	predefined
	File ext:	h
	Author:		Gogolev Anton
*********************************************************************/

#ifndef __PREDEFINED_H__
#define __PREDEFINED_H__

#include "typedefs.h"
#include "sort.h"
#include "xmlexportflags.h"

//////////////////////////////////////////////////////////////////////////
// New Password Storage
typedef struct tagKEYSIZE {
	TCHAR szItem[128];
	long lInfo; // Loword - key size, Hiword - rounds recommended
} KEYSIZE, *LPKEYSIZE;

const KEYSIZE g_aKeySizes[] = {
	{ _T("1024-bit Hashed Key"), MAKELONG(1024, 20) },
	{ _T("512-bit Hashed Key"), MAKELONG(512, 32) },
	{ _T("256-bit Hashed Key"), MAKELONG(256, 64) },
	{ _T("128-bit Hashed Key"), MAKELONG(128, 128) },
};

//////////////////////////////////////////////////////////////////////////
// For predefined Elements
typedef struct tagELEMENT {
	TCHAR szElementName[nNameLength];
	TCHAR szAddress[nAddressLength];
	TCHAR szNotes[nNotesLength];
	long lIconID;
} ELEMENT, *LPELEMENT;

// Predefined elements
const ELEMENT g_aElements[] = {
	{ _T("RSDN Registration"), _T("http://www.rsdn.ru"), 
		_T("Russian Software Developers Network registration."), 7	},
	{ _T("The CodeProject Registration"), _T("http://www.codeproject.com"),
		_T("The CodeProject registration."), 7 },
	{ _T("Brainbench Registration"), _T("http://www.brainbench.com"),
		_T("Brainbench registration."), 7 },
};

//////////////////////////////////////////////////////////////////////////
// For predefined Categories
typedef struct tagCATEGORY {
	TCHAR szName[nNameLength];
	TCHAR szDescription[nNotesLength];
	long lIconID;
} CATEGORY, *LPCATEGORY;

const CATEGORY g_aCategories[] = {
	{ _T("E-Mail Accounts"), _T("This category contains my personal E-Mail ")
		_T("Accounts information, such as logins, passwords, mail servers addresses, etc."), 6 },
	{ _T("Dial-Up Internet Access"), _T("This category contains information about my ")
		_T("Dial-Up Internet Connection Accounts and Internet Service Providers."), 8 },
	{ _T("Local Area Network Access"), _T("Logins and passwords for authorization in my ")
		_T("Local Area Network."), 4 },
	{ _T("Internet Sites Registrations"), _T("This category contains information I supplied ")
		_T("when registered on various Internet Sites."), 13 },
	{ _T("Microsoft� .NET� Passport"), 
		_T("My Microsoft� .NET� Passport information is stored in this category."), 2 },
	{ _T("Local Area Network Resources"), _T("This category contains logins, passwords and ")
		_T("other important information about shared resources in my Local Area Network."), 4  },
	{ _T("Internet Pagers"), _T("This category contains logins and passwords I supply ")
		_T("to use my Internet Pagers."), 10 },
	{ _T("Peer-To-Peer Networks"), _T("This category contains logins and passwords used ")
		_T("to log on to Peer-To-Peer Networks."), 4 },
	{ _T("WiFi Devices Passwords"), _T("This category contains logins and passwords used ")
		_T("to communicate with WiFi Devices."), 23 },
	{ _T("Bluetooth Devices Passwords"), _T("This category contains logins and passwords used ")
		_T("to communicate with Bluetooth Devices."), 25 }
};

//////////////////////////////////////////////////////////////////////////
// For predefined Rating Values
typedef struct tagRATING {
	TCHAR szName[nNameLength];
	BYTE cRating;
	COLORREF crColor;
} RATING, *LPRATING;

// Predefined ratings
const RATING g_aRatings[] = {
	{ _T("Critical"), 10, RGB(255, 51, 0) },
	{ _T("Below Critical"), 9, RGB(255, 121, 75) },
	{ _T("Very Important"), 8, RGB(255, 153, 51) },
	{ _T("Above Important"), 7, RGB(255, 204, 102) },
	{ _T("Important"), 6, RGB(255, 219, 157) },
	{ _T("Normal"), 5, RGB(255, 255, 0) },
	{ _T("Below Normal"), 4, RGB(255, 255, 255) },
	{ _T("Unimportant"), 3, RGB(153, 204, 255) },
	{ _T("Insignificant"), 2, RGB(62, 154, 222) },
	{ _T("Below Insignificant"), 1, RGB(0, 131, 215) },
	{ _T("Cold"), 0, RGB(0, 51, 153) }
};

//////////////////////////////////////////////////////////////////////////
// For predefined Sort Orders
typedef struct tagSORTORDER {
	TCHAR szName[nNameLength];
	PFNTVCOMPARE pfnCompare;
	SORTPARAMETERS spSort;
} SORTORDER, *LPSORTORDER;

const SORTORDER g_aSortOrder[] = {
	{ _T("Name Ascending"), 0, { 0, 0, SetAscending(0) } },
	{ _T("Name Descending"), 0, { 0, 0, SetDescending(0) } },
	{ _T("Login Ascending"), 0, { 0, 0, SetAscending(0) } },
	{ _T("Login Descending"), 0, { 0, 0, SetDescending(0) } },
	{ _T("Rating Ascending"), 0, { 0, 0, SetAscending(0) } },
	{ _T("Rating Descending"), 0, { 0, 0, SetDescending(0) } }
};

//////////////////////////////////////////////////////////////////////////
// Export To XML Entities
typedef struct tagXMLENTITY {
	TCHAR szName[nNameLength];
	TCHAR szDescription[nNotesLength];
	unsigned int nFlag;
} XMLENTITY, *LPXMLENTITY;

const XMLENTITY g_aEntities[] = {
	{ _T("Category Name"), _T("Exports Category Name"), 
		XEF_CATEGORYNAME },
	{ _T("Category Description"), _T("Exports Category Description if there is one"), 
		XEF_CATEGORYDESCRIPTION },
	{ _T("Category Icon"), _T("Exports Category Icon Index, not an icon itself"),  
		XEF_CATEGORYICON },
	{ _T("Category Rating"), _T("Exports Element Rating as a text value"),
		XEF_CATEGORYRATING },
	{ _T("Element Name"), _T("Exports Element Name"),
		XEF_ELEMENTNAME },
	{ _T("Login"), _T("Exports Login"),
		XEF_LOGIN },
	{ _T("Password"), _T("Exports Password (non-encrypted)"),
		XEF_PASSWORD },
	{ _T("Address"), _T("Exports Address"),
		XEF_ADDRESS },
	{ _T("Notes"), _T("Exports Notes"),
		XEF_NOTES },
	{ _T("Element Rating"), _T("Exports Element Rating as a text value"),
		XEF_ELEMENTRATING },
	{ _T("Element Icon"), _T("Exports Element Icon Index, not an icon itself"),
		XEF_ELEMENTICON },
	{ _T("SmartType"), _T("Exports SmartType state for this Element"),
		XEF_SMARTTYPE },
	{ _T("Target Window Title"), _T("Exports Target Window Title for SmartType"),
		XEF_TARGETWINDOWTITLE },
	{ _T("Login Control ID"), _T("Exports Login Control Identifier for SmartType"),
		XEF_LOGINCONTROLID },
	{ _T("Password Control ID"), _T("Exports Password Control Identifier for SmartType"),
		XEF_PASSWORDCONTROLID },
};

#endif //__PREDEFINED_H__

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Web Developer
Russian Federation Russian Federation
I'll think about it later on...

Comments and Discussions