Click here to Skip to main content
15,887,821 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Not able to call .NET function with return value in javascript Pin
Nisha Agrawal8-Oct-09 22:54
Nisha Agrawal8-Oct-09 22:54 
GeneralRe: Not able to call .NET function with return value in javascript Pin
amittinku8-Oct-09 23:00
amittinku8-Oct-09 23:00 
AnswerRe: Not able to call .NET function with return value in javascript Pin
Nisha Agrawal8-Oct-09 23:19
Nisha Agrawal8-Oct-09 23:19 
AnswerRe: Not able to call .NET function with return value in javascript Pin
codelinks8-Oct-09 23:24
codelinks8-Oct-09 23:24 
GeneralRe: Not able to call .NET function with return value in javascript Pin
Nisha Agrawal8-Oct-09 23:28
Nisha Agrawal8-Oct-09 23:28 
QuestionAccessing the Database Pin
KSR818-Oct-09 15:04
KSR818-Oct-09 15:04 
AnswerRe: Accessing the Database Pin
N a v a n e e t h8-Oct-09 16:59
N a v a n e e t h8-Oct-09 16:59 
QuestionI need help decrypting pw's in a db. PLEASE HELP! Pin
prestonascott8-Oct-09 12:06
prestonascott8-Oct-09 12:06 
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

AnswerRe: I need help decrypting pw's in a db. PLEASE HELP! Pin
Christian Graus8-Oct-09 12:17
protectorChristian Graus8-Oct-09 12:17 
GeneralRe: I need help decrypting pw's in a db. PLEASE HELP! Pin
prestonascott8-Oct-09 12:36
prestonascott8-Oct-09 12:36 
GeneralRe: I need help decrypting pw's in a db. PLEASE HELP! Pin
Christian Graus8-Oct-09 12:42
protectorChristian Graus8-Oct-09 12:42 
GeneralRe: I need help decrypting pw's in a db. PLEASE HELP! Pin
prestonascott8-Oct-09 12:47
prestonascott8-Oct-09 12:47 
GeneralRe: I need help decrypting pw's in a db. PLEASE HELP! Pin
Christian Graus8-Oct-09 12:52
protectorChristian Graus8-Oct-09 12:52 
GeneralRe: I need help decrypting pw's in a db. PLEASE HELP! Pin
prestonascott8-Oct-09 13:05
prestonascott8-Oct-09 13:05 
GeneralRe: I need help decrypting pw's in a db. PLEASE HELP! Pin
Christian Graus8-Oct-09 13:14
protectorChristian Graus8-Oct-09 13:14 
AnswerRe: I need help decrypting pw's in a db. PLEASE HELP! Pin
Tiger4568-Oct-09 18:35
Tiger4568-Oct-09 18:35 
GeneralRe: I need help decrypting pw's in a db. PLEASE HELP! Pin
prestonascott8-Oct-09 20:30
prestonascott8-Oct-09 20:30 
Questionwindow.open( "URL" ..... for localhost is not working Pin
amit k mistry8-Oct-09 11:26
amit k mistry8-Oct-09 11:26 
AnswerRe: window.open( "URL" ..... for localhost is not working Pin
Christian Graus8-Oct-09 11:59
protectorChristian Graus8-Oct-09 11:59 
GeneralRe: window.open( "URL" ..... for localhost is not working Pin
amit k mistry8-Oct-09 12:02
amit k mistry8-Oct-09 12:02 
GeneralRe: window.open( "URL" ..... for localhost is not working Pin
Christian Graus8-Oct-09 12:14
protectorChristian Graus8-Oct-09 12:14 
GeneralRe: window.open( "URL" ..... for localhost is not working Pin
amit k mistry8-Oct-09 12:32
amit k mistry8-Oct-09 12:32 
GeneralRe: window.open( "URL" ..... for localhost is not working Pin
Christian Graus8-Oct-09 12:44
protectorChristian Graus8-Oct-09 12:44 
AnswerRe: window.open( "URL" ..... for localhost is not working Pin
Dinesh Reghunath9-Oct-09 2:12
professionalDinesh Reghunath9-Oct-09 2:12 
GeneralNo GotFocus focus event in ASP.NET! Pin
tunsten8-Oct-09 8:46
tunsten8-Oct-09 8:46 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.