Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27365

VS 2010 Encrypt ListBox1?

$
0
0
I am making a program that will let you save accounts to various sites so that in case you forget your password it will be saved on your computer and encrypted.

This is what my program looks like:
Name:  1.png
Views: 30
Size:  20.2 KB

This is the code I used to encrypt and decrypt my accounts.
Code:

    Private Sub Encrypt_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
        ListBox1.Text = Convert.ToBase64String(New System.Text.ASCIIEncoding().GetBytes(ListBox1.Text))
    End Sub

    Private Sub Decrypt_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
        ListBox1.Text = New System.Text.ASCIIEncoding().GetString(Convert.FromBase64String(ListBox1.Text))
    End Sub

Whenever I try to encrypt the ListBox1.Text it doesn't work. It doesn't give me any errors, it just doesn't work.

Thanks. :bigyello:
Attached Images
 

Viewing all articles
Browse latest Browse all 27365

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>