|
Hi,
I want to encrypt a password and insert it into SQL DB
and then discrypt it for sending it to user .
how could i do it
Thanx n regards
Amit sahu
|
|
|
|
|
Hi Amit,
There are lots of javascripts available to encrypt/decrypt passwords.
They come in combinations for encrypt/decrypt. apply encrypt script when u insert password. and decrypt while u r checking.
U can use only incrypting script only and check incrypted version of password directly with database. thus your original decypted password never travells through network and no possibility to be hacked via channel.
Just type "Encrypt Password + Javascript" in goole and u will get tons of scripts. u can prepare urself also simple script like replace "D" with ASCII(D) --> ASCII(D) + 25.
Anand Desai
Developer
Atharva Infotech
|
|
|
|
|
hi Amit,
Forgot to tell one thing more. IF u use javascript for that , dont write JS function inline with HTML... because then ur script will be exposed to client machine.
Instead of that write JS function in separate Javascript ffile and include that file in ur html.
Anand Desai
Developer
Atharva Infotech
|
|
|
|
|
thanx anand
a js file can also be get by just write the url
by getting the name of js file from source view of html page.
Is there is no such C# code that will help me
|
|
|
|
|
U can set the acces parameter anyways..
or if u doubt this way.. then u can crate your own method and steps in cs file also. just like first add any number in ASCII code of character then subtract any fix number then add/multiply/divide or anything..
I advice u to create your own steps and do exactly reverse steps to decryt.
That would be simplest and best for u.
Anand Desai
Developer
Atharva Infotech
|
|
|
|
|
thanx once again ............
for helping me and interest..
i'll try it and yes its a good way
|
|
|
|
|
Note that this is not encryption, it's only scrambling. An encrypted password is hard to crack, a scrambled password is not.
Also, any solution involving Javascript is totally unsafe. Any Javascript that the browser uses can easily be viewed and debugged using well-known tools like FireBug. Internet Explorer 8 will come with a similar tool built in.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
There is a method to encrypt a password,but it can't discrypt.
string pass = System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(tbPass.Text, "MD5");
If you want to find pass,you can reset pass when user have answered your question rightly.
studing is processing in this life.
|
|
|
|
|
thanx nyeying
But i have already use this FormsAuthentication.HashPasswordForStoringInConfigFile()
method in my code
now the problem here is on forget password . i have to send it to user mail it, but i can't able to discrypt it
|
|
|
|
|
The purpose of hashing the password is that noone can read it. The price that you pay is that you can't read it yourself, so if the user has lost the password, you have to set a new password.
If you want to be able to read the password, you can use encryption instead of hashing. Look in the System.Security.Cryptography namespace.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
"MD5" only can encrypt,but discrypt.If you want to find old password,it is impossible.The only method is set a new password,then you send it to user's email.
studing is processing in this life.
|
|
|
|
|
Hi coders,
I am using .NET 2008 version. I am currently facing problem with urls. i dont want to show my URL like '.....com/redirect.aspx?ser=..' but instead of same i want to show the fix url like '.....com/'.
I have written like following:
<itemtemplate>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr> <td width="100%" class="buttons4" style="padding-left: 20px;"> <asp:hyperlink runat="server" navigateurl="<%# String.Concat("ServiceRedirect.aspx?serid=",DataBinder.Eval(Container.DataItem,"nServiceID")) %>"><%# DataBinder.Eval(Container.DataItem, "cServiceName")%></asp:hyperlink> </td> </tr>
</table>
</itemtemplate>
I dont want to show "ServiceRedirect.aspx?serid=.." as my URL.
I know this can be done by setting 'RewriteRule' in HTACCESS file. Can anyone please tell me how to set 'RewriteRule' in .NET????? Or please suggest me any other way to do it.
Thanks in advance for any help.
Anand Desai
Developer
Atharva Infotech
|
|
|
|
|
I want to know this too.
studing is processing in this life.
|
|
|
|
|
|
i want to add watermarks to uploaded videos
how can i do this?
|
|
|
|
|
In my form, I need to validate the url including http or https. I put the ValidtionExpression as below:
(http(s)?://((w{3})+\.)+([\w-]+\.)+(\w{2,4})+(/[\w- ./?%&=]*)?)|((w{3})+\.)+([\w-]+\.)+(\w{2,4})+(/[\w- ./?%&=]*)?
This is working perfectly fine when I give the full url, like for eg: http://www.google.com or http://www.codeproject.com. Suppose if the user enters http://abc.com, it should also be considered as valid url. Examples of such live urls are: http://irctc.co.in, https://login.live.com/login.srf (msdn site) etc. So how to modify the above url? I tried removing many of the expressions starting with 'w' but couldn't succeed. Can anybody provide any help?
Thanks
meeram395
Success is the good fortune that comes from aspiration, desperation, perspiration and inspiration.
|
|
|
|
|
Hi all.
I have a question for guys.
I have a Form1 include Button2,Button3.
When i Click Button2 it's show Form2 and when i click Buttton3 on Form2 it's show Form3,and input data into a Textbox and click Button OK in From3,so data tranform from Form3 to Form2,and Click Button OK on Form2, so data tranform from Form2 to From1.Plz help me how to do it.
if you cound not try then
msgbox("you will lose")
else
msgbox("you can change yourself")
end if
|
|
|
|
|
How is it related with ASP.NET ? Please put your question to correct forum.
cheers,
Abhijit
|
|
|
|
|
Yes,your question is blur.
If you want to implement such as register user,you can use three panels.
studing is processing in this life.
|
|
|
|
|
Hi
You just try this-
formname.Textbox1.text
By this method u can get the ultimate result
Bye
Amit
|
|
|
|
|
hello im an asp.net newbie and i have a small question.
in my C# code i have an object named X that has a get\set property named ID.
i can get the value of the object from javascript method by doing the following
var value = <%=X.ID%>
my question is
how can i set values to X.ID?
thanks in advance
|
|
|
|
|
You can't. You have to send the value to the server, where you can put it in the property.
You can for example put the value in a hidden field, where you can get it once the form is posted to the server.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
|
Hi,
I am developing a C#.net application which shows a report of a retail store, the database contains some lacks records, i wrote a query which retrives data to display in the report. It is taking more than 5 mins to execute the query in SQL Server. When i run this query in my application it is giving "time out" error, In sql server I am getting the records, where as in my .net application it is giving the error.
Please help me in this matter.
Thanks & Regards,
O. NARENDRA BABU.
|
|
|
|
|
you can change the timeout by CommandTimeOut property.
SqlCommand cmd=new SqlCommand();
cmd.CommandTimeOut=yourtime;
Take a Look[^]
Or even you can try to optimize the SQL Query that it can give output as early as possible. 5 min is too much
cheers,
Abhijit
|
|
|
|