Well, I guess it depends on how secure you need to be
I mean if it didn't have to be extremely complex or secure you could just make up an algorithm for the characters of the password. All numbers and letters fall between ascii values of 48 - 57, 65 - 90 or 97 - 122 so you could just perform some math on each character to change its value to an unreadable one that only you knew how to calculate. i.e.
Code:
Option Explicit
Dim ePassword As String
Dim dPassword As String
Private Sub cmdDecrypt_Click()
Dim iCount As Integer
dPassword = ""
For iCount = 1 To Len(ePassword)
dPassword = dPassword & Chr((Asc(Mid(ePassword, iCount, 1)) + (Len(ePassword) + (iCount * 2))) / 2)
Next
MsgBox dPassword, vbOKOnly, "Decrypted Password"
End Sub
Private Sub cmdEncrypt_Click()
Dim iCount As Integer
ePassword = ""
For iCount = 1 To Len(txtInput.Text)
ePassword = ePassword & Chr((Asc(Mid(txtInput.Text, iCount, 1)) * 2) - (Len(txtInput.Text) + (iCount * 2)))
Next
txtInput.Text = ""
MsgBox ePassword, vbOKOnly, "Encrypted Password"
End Sub
Try that out. It would convert the password to an unreadable ascii value that you could store in a file and then recalculate to compare. You may want to be a little more creative and alter the length though.
Hope that helps,
KillemAll
Just saw oetje's post :D