please suggest me a code in C# for the encryption and decryption of password ....i would like store the password in database in encrypted form and after login the encrypted password sholud be fetch from database and decrypt it and match with password entered
by user then only the user is allowed to move ahead in the website
i m creating a class for insert query which is having a method as below
public class insert
{
public return tye(what you can give) method name(table name,namevalue collection)
{
code for insert query
}
and from my default page on button click i have to code in such a way that it should pass keyvalue(column name) and value in the namevalue collection and table name to class and namevalue collection should be travesed and on the particulr key values should
be inserted
i have to code in such a way that it should pass keyvalue(column name) and value in the namevalue collection and table name to class and namevalue collection should be travesed and on the particulr key values should be inserted
I still cannot understand what you wanna do……?
And do you wanna fetch the instance of your class Type in your UI?
in my applications (solution explorer) i have added a class in that class i want to declare a method with two parameter as(string table name,namevalue collection) in that method i have to write a code for insert query such as insert into table name(from
parameter 1) column name from key of namevalue collection and col values from values on that key...it should traveresed all the key of namevalue collection
from my default page i have to code such that colm name are in key of namevalue collection and its values are in the keyvalue which are to be inserted
aqueelahmad
0 Points
9 Posts
method in C# for encryption and decryption of password
Nov 23, 2012 12:05 PM|LINK
hey friends......
please suggest me a code in C# for the encryption and decryption of password ....i would like store the password in database in encrypted form and after login the encrypted password sholud be fetch from database and decrypt it and match with password entered by user then only the user is allowed to move ahead in the website
Decker Dong ...
All-Star
118619 Points
18779 Posts
Re: method in C# for encryption and decryption of password
Nov 24, 2012 12:39 AM|LINK
Hello,
What does this mean?
I don't understand what you really wanna do……?
aqueelahmad
0 Points
9 Posts
Re: method in C# for encryption and decryption of password
Nov 24, 2012 02:54 AM|LINK
i m creating a class for insert query which is having a method as below
public class insert
{
public return tye(what you can give) method name(table name,namevalue collection)
{
code for insert query
}
and from my default page on button click i have to code in such a way that it should pass keyvalue(column name) and value in the namevalue collection and table name to class and namevalue collection should be travesed and on the particulr key values should be inserted
Decker Dong ...
All-Star
118619 Points
18779 Posts
Re: method in C# for encryption and decryption of password
Nov 24, 2012 07:56 AM|LINK
I still cannot understand what you wanna do……?
And do you wanna fetch the instance of your class Type in your UI?
aqueelahmad
0 Points
9 Posts
Re: method in C# for encryption and decryption of password
Nov 24, 2012 08:35 AM|LINK
yes,
in my applications (solution explorer) i have added a class in that class i want to declare a method with two parameter as(string table name,namevalue collection) in that method i have to write a code for insert query such as insert into table name(from parameter 1) column name from key of namevalue collection and col values from values on that key...it should traveresed all the key of namevalue collection
from my default page i have to code such that colm name are in key of namevalue collection and its values are in the keyvalue which are to be inserted
Decker Dong ...
All-Star
118619 Points
18779 Posts
Re: method in C# for encryption and decryption of password
Nov 24, 2012 08:56 AM|LINK
Hello again,
If you wanna fetch the instance of the method in UI,you can call it:
1)Suggestions:Change the class to static one——
public static class Insert { public static SomeType MethodName(table name,namevalue collection) { //Do what you wanna do…… } }2)And then in Ui:
SomeType st = Insert.MethodName(parm1Value,parm2Value);
aqueelahmad
0 Points
9 Posts
Re: method in C# for encryption and decryption of password
Nov 24, 2012 09:03 AM|LINK
please give me the insert query and UI code
Decker Dong ...
All-Star
118619 Points
18779 Posts
Re: method in C# for encryption and decryption of password
Nov 24, 2012 09:22 AM|LINK
Sorry I can only give you a concept because it just depends on your situation as well as detailled table.
If you don't know more about how to use SqlCommand,in fact you can see this torturial:
private static Type ReadOrderData(string connectionString) { string queryString = "Insert into……"; using (SqlConnection connection = new SqlConnection( connectionString)) { SqlCommand command = new SqlCommand( queryString, connection); connection.Open(); command.ExecuteNonQuery(); return sometypeInstance; } }aqueelahmad
0 Points
9 Posts
Re: method in C# for encryption and decryption of password
Nov 24, 2012 09:32 AM|LINK
i want the UI code which i have to write for name value collection
ToughMan
Participant
1490 Points
635 Posts
Re: method in C# for encryption and decryption of password
Nov 24, 2012 10:41 AM|LINK
What really do you wanna do?
I cannot understand, either!
What's "name value collection"?