I have a fairly basic knowlegde of Visual basic,
I am trying to create a form to create a username and password which is then saved in a .txt file, the problem being that anyone can read it.
Is there any way that it can be simply encrypted before being saved into the .txt file. i ahve created a module for the creation of a username and password. the Creation works and is saved correctly, i just don't undersand the correct code for it to be encrypted before it is saved
Here is the code so far:
Public Sub CreateUser() On Error GoTo A Dim User, Pass As String User = FrmLogin.txtUsernameCreate.Text Pass = FrmLogin.txtPasswordCreate.Text Open App.Path & "/Users/" & User & ".txt" For Output As #1 Print #1, User Print #1, Pass Close #1 MsgBox "Your Account Has Heen Created Successfully", vbInformation, "Congratulations" FrmLogin.txtUsernameCreate.Text = "" FrmLogin.txtPasswordCreate.Text = "" Exit Sub A: MsgBox " Account Cannot Be Created", vbCritical, "Error" End Sub Public Sub ChangeASC() Dim ASC As String ASC = FrmLogin.txtPasswordCreate.Text For k = 1 To Len(ASC) ASC(k) = ASC(k) + (2) Output = App.Path & "/Users/" & User & ".txt" End Sub
Thanks in advance!