password rememberer in vb.net

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Porkie999
    New Member
    • Sep 2007
    • 19

    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
  • VBPhilly
    New Member
    • Aug 2007
    • 95

    #2
    Originally posted by Porkie999
    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?

    Comment

    • VBPhilly
      New Member
      • Aug 2007
      • 95

      #3
      Originally posted by Porkie999
      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):

      Code:
      Public Function RC4(ByVal Expression As String, ByVal Password As String) As String
      On Error Resume Next
      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
      If Len(Password) = 0 Then
          Exit Function
      End If
      If Len(Expression) = 0 Then
          Exit Function
      End If
      If Len(Password) > 256 Then
          Key() = StrConv(Left$(Password, 256), vbFromUnicode)
      Else
          Key() = StrConv(Password, vbFromUnicode)
      End If
      For X = 0 To 255
          RB(X) = X
      Next X
      X = 0
      Y = 0
      Z = 0
      For X = 0 To 255
          Y = (Y + RB(X) + Key(X Mod Len(Password))) Mod 256
          Temp = RB(X)
          RB(X) = RB(Y)
          RB(Y) = Temp
      Next X
      X = 0
      Y = 0
      Z = 0
      ByteArray() = StrConv(Expression, vbFromUnicode)
      For X = 0 To Len(Expression)
          Y = (Y + 1) Mod 256
          Z = (Z + RB(Y)) Mod 256
          Temp = RB(Y)
          RB(Y) = RB(Z)
          RB(Z) = Temp
          ByteArray(X) = ByteArray(X) Xor (RB((RB(Y) + RB(Z)) Mod 256))
      Next X
      RC4 = StrConv(ByteArray, vbUnicode)
      End Function

      Comment

      • Porkie999
        New Member
        • Sep 2007
        • 19

        #4
        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?

        Comment

        • Porkie999
          New Member
          • Sep 2007
          • 19

          #5
          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.


          [CODE=vbnet]Public Class Form1
          Dim Login As String
          Dim Password As String
          Dim Website As String
          Private Sub Label1_Click(By Val sender As System.Object, ByVal e As System.EventArg s) Handles Label1.Click

          End Sub

          Private Sub TextBox1_TextCh anged(ByVal sender As System.Object, ByVal e As System.EventArg s) Handles TextBox1.TextCh anged

          End Sub

          Private Sub Button1_Click(B yVal sender As System.Object, ByVal e As System.EventArg s) Handles Button1.Click

          System.IO.File. WriteAllText("P assword.txt", "C:\Documen ts and Settings\Admin\ My Documents\Passw ord.txt")

          End Sub

          Private Sub AddNewLoginTool StripMenuItem_C lick(ByVal sender As System.Object, ByVal e As System.EventArg s) Handles AddNewLoginTool StripMenuItem.C lick

          End Sub
          End Class[/CODE]
          Last edited by Killer42; Sep 23 '07, 07:04 AM. Reason: Added [CODE=vbnet] tag

          Comment

          Working...