473,413 Members | 1,856 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,413 software developers and data experts.

password rememberer in vb.net

Password rememberer

Ok I have 3 textboxes named "Login" , "Password" and "Website".

Basically when you enter the three details, I have a button which I press which saves it to a text file named Passwords.txt

What code am I looking at for this?


Really stuck any help would be nice :)


Regards
George
Sep 21 '07 #1
4 1133
password rememberer

ok i have 3 text boxes named "Login" , "Password" and "Website"

basically when you enter the three details , i have a button which i press which saves it to a text file named Passwords.txt

wot code am i looking at for this?


really stuck any help would be nice :)


regards
george
Are you looking for an encryption solution?
Sep 21 '07 #2
password rememberer

ok i have 3 text boxes named "Login" , "Password" and "Website"

basically when you enter the three details , i have a button which i press which saves it to a text file named Passwords.txt

wot code am i looking at for this?


really stuck any help would be nice :)


regards
george

an encryption routine (courtesy of Andreas J”nsson):

Expand|Select|Wrap|Line Numbers
  1. Public Function RC4(ByVal Expression As String, ByVal Password As String) As String
  2. On Error Resume Next
  3. Dim RB(0 To 255) As Integer, X As Long, Y As Long, Z As Long, Key() As Byte, ByteArray() As Byte, Temp As Byte
  4. If Len(Password) = 0 Then
  5.     Exit Function
  6. End If
  7. If Len(Expression) = 0 Then
  8.     Exit Function
  9. End If
  10. If Len(Password) > 256 Then
  11.     Key() = StrConv(Left$(Password, 256), vbFromUnicode)
  12. Else
  13.     Key() = StrConv(Password, vbFromUnicode)
  14. End If
  15. For X = 0 To 255
  16.     RB(X) = X
  17. Next X
  18. X = 0
  19. Y = 0
  20. Z = 0
  21. For X = 0 To 255
  22.     Y = (Y + RB(X) + Key(X Mod Len(Password))) Mod 256
  23.     Temp = RB(X)
  24.     RB(X) = RB(Y)
  25.     RB(Y) = Temp
  26. Next X
  27. X = 0
  28. Y = 0
  29. Z = 0
  30. ByteArray() = StrConv(Expression, vbFromUnicode)
  31. For X = 0 To Len(Expression)
  32.     Y = (Y + 1) Mod 256
  33.     Z = (Z + RB(Y)) Mod 256
  34.     Temp = RB(Y)
  35.     RB(Y) = RB(Z)
  36.     RB(Z) = Temp
  37.     ByteArray(X) = ByteArray(X) Xor (RB((RB(Y) + RB(Z)) Mod 256))
  38. Next X
  39. RC4 = StrConv(ByteArray, vbUnicode)
  40. End Function
  41.  
Sep 21 '07 #3
no i want to be able to type say

dsfsjfjsjjfs in User Box
fjdjskfjds in password box
www.thescripts.com in website box

then i want to have a button which says "save" which then saves the 3 above pieces of text into a notepad file.

if u understand what i mean?
Sep 21 '07 #4
So like I said I want to be able to type a login, password and website in the 3 textboxes then click a button which saves it into my .txt file.

Just make any required adjustments to do this. I am really confused with this so any help would be appreciated.


Expand|Select|Wrap|Line Numbers
  1. Public Class Form1
  2.     Dim Login As String
  3.     Dim Password As String
  4.     Dim Website As String
  5.     Private Sub Label1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label1.Click
  6.  
  7.     End Sub
  8.  
  9.     Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
  10.  
  11.     End Sub
  12.  
  13.     Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
  14.  
  15.         System.IO.File.WriteAllText("Password.txt", "C:\Documents and Settings\Admin\My Documents\Password.txt")
  16.  
  17.     End Sub
  18.  
  19.     Private Sub AddNewLoginToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AddNewLoginToolStripMenuItem.Click
  20.  
  21.     End Sub
  22. End Class
Sep 22 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

11
by: John Victor | last post by:
In my mysql database, I've stored all the passwords using the PASSWORD() function. Now I'm running a test and need to compare the password in my php document to that saved in the database. I used...
2
by: Jill Elaine | last post by:
I am building an Access 2002 frontend with linked tables to an encrypted Paradox 7 database. When I first create these linked tables, I'm asked for the password to the encrypted Paradox database,...
10
by: Fabrizio | last post by:
(Sorry for the crosspost, but I really don't know which is the right newsgroup!) Hi all, I try to change the password to a user that as to change the password at first logon: try {
6
by: Andre Ranieri | last post by:
I'm trying to create a login page for customers to log into our corporate website, our presidents naturally wants the user and password fields to populate from a cookie so the customer doesn't have...
5
by: scorpion53061 | last post by:
is it possible to set the database password that you can set in access for a database from a vb.net application?
26
by: David Garamond | last post by:
I read that the password hash in pg_shadow is salted with username. Is this still the case? If so, since probably 99% of all PostgreSQL has "postgres" as the superuser name, wouldn't it be better...
8
by: Katash | last post by:
Hello, I am new to PHP and am working on a login system for my site, currently supplied passwords are passed to MySQL and stored as md5 hashes, my question is :- seeing as md5 is 1 way only what...
3
by: julianmoors | last post by:
Hey, Currently I'm writing a VB.NET/1.1 app and I need to mask the input for the password field. Does anyone know how to do this in VB? I've seen a C# example, but wouldn't know how to convert...
2
by: DarthPeePee | last post by:
Hello everyone. I am working on a Password Strength Meter and I am running into 1 problem that I would like to fix. When pressing the "Clear Password & Try Again" button, the password clears...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.