prestonascott -1 Newbie Poster

A client of mine has an existing site that i am working on for them. i recently got one of the admin portals working only my client forgot his password and the old developer did not include a 'forgot password' option. I looked up the appropriate table in the database and found that the passwords are encrypted strings. i searched the sites code and is appears that the passwords are encrypted using 3DES and/or Base64. i have no clue what either of these two types of encryption are or how they work and my client needs this solved ASAP. I have attached the segment of code that processes the passwords. if someone could please help me by telling me what type of encoder i need to properly make new passwords to put in the db or even better if someone could tell me what (if any) decoder is appropriate for my strings.
the password strings (from the db):
sjC7ZhlynyK9RasULeXEQDpc5Y4=
aLOSCh1wPnjkQKDQzZOJunUSkOs=
XrqrfzuWGpwDYbhCtAB5Lc5iB8M=
0iRlJxGGzYHOiP0PgyCTCaAIf3E=
lGfiERF+kuVrO2qEoQXxROxkPxM=
065w9Cma1RivOlF5s6CluCmFjq0=
TOlL2KBYNhce2Fp7fOoS1CjDaFY=

Segment of code that encrypts password entered in form:

/// <summary>
		/// Encrypt text using 3DES, then encodes it to BASE64
		/// </summary>
		/// <param name="clear">plain text</param>
		/// <returns>Base64 encoded cypher text</returns>
		public static string MakeBase64CypherString(string clear)
		{
			return Convert.ToBase64String(ASCIIEncoding.ASCII.GetBytes(Encrypt(clear)));
		}

		/// <summary>
		/// Decodes a BASE64 string which contains a 3DES cypher text
		/// </summary>
		/// <param name="hidden">Base64 encoded cypher text</param>
		/// <returns>plain text</returns>
		public static string DecodeBase64CypherString(string hidden)
		{
			return Decrypt(ASCIIEncoding.ASCII.GetString(Convert.FromBase64String(hidden)));
		}

		/// <summary>
		/// Encrypt text using 3DES
		/// </summary>
		/// <param name="clear">plain text</param>
		/// <returns>encrypted text</returns>
		protected static string Encrypt(string clear)
		{
			Settings settings = Setting.AllSettings();
			Setting IV = settings["IV"];
			Setting Key = settings["Key"];
			intelli3DESEncryption crypto = new intelli3DESEncryption("StratusRewards.RMA.BusinessServices.Application");
			crypto.IV = IV.Data;
			crypto.Key = Key.Data;
			return crypto.EncryptStringToString(clear);
		}

		/// <summary>
		/// Decrypt text using 3DES
		/// </summary>
		/// <param name="hidden">cypher text</param>
		/// <returns>plain text</returns>
		protected static string Decrypt(string hidden)
		{
			Settings settings = Setting.AllSettings();
			Setting IV = settings["IV"];
			Setting Key = settings["Key"];
			intelli3DESEncryption crypto = new intelli3DESEncryption("StratusRewards.RMA.BusinessServices.Application");
			crypto.IV = IV.Data;
			crypto.Key = Key.Data;
			return crypto.DecryptStringToString(hidden);
		}

		#endregion
sknake commented: Posted on daniweb, programmersheaven and codeproject.... -1
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.