0

hi

i want sql query to insert encrypted passwrd ??

foreample if user password : 123456

what is the sql query to insert it incrypted

5
Contributors
7
Replies
10
Views
4 Years
Discussion Span
Last Post by Rahul47
0

so what is the function ?? how i use it ??

How would I know? You still didn't said which programming language you are using

0

urtrivedi

thank you i will look

peter_budo

i use asp.net with vb.net

i want vb.net code to encrypt and decrypt password

0

You Can Use Base64 Encryption function as follows:

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        TextBox3.Text = Convert.ToBase64String(New System.Text.ASCIIEncoding().GetBytes(TextBox2.Text))
    End Sub

In above example the text of TextBox2 is converted to encrypted and dislayed in TextBox3.
So if you want to add it to database you can do it as follows:

1) Store it in a variable:

Dim encrypt as string
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        encrypt = Convert.ToBase64String(New System.Text.ASCIIEncoding().GetBytes(TextBox2.Text))
    End Sub

2) Now you can use encrypt variable to insert into database.

Thanks,

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.