For starters, I had to lookup "FFXIV"... That's my age showing... lol
Cipher / Decipher is totally, what's the phrase, above my pay grade... lol Just curious as to why you would want / need a program like this one...
By the way... I like your "quote"... Cool...
24;4?xpsrDaq‚NWF{QHK^J\f~<KDLAv:zq\W
How do you distribute the key securely?
How do you distribute the key securely?
Print it on a piece of paper and include it with the software packaging, or send a verification e-mail at registration time.
my app does not have (or need) a distro
so unsure what I need to get together? Unless my thread just got hi-jacked and missed the branch :-P
Sorry, the thread says encrypt decrypt didn't mean to hi-jack. I thought I was completing the thought about encryption decryption you left unfinished.
But then I have to say it is not clear to me what your project is about.
And I suggest you post project code in Programs Board so it's not mistaken as a discussion or a question.
str_crypt username+"*"+pw+"*"+key, key, "e"
Function STR_CRYPT$ (strPlainTxt As String, strKey As String, method As String)
'/ This encryption uses a key in addition to a pw.
Dim i, c As Integer
Dim strBuff As String
If Len(strKey) Then
For i = 1 To Len(strPlainTxt)
c = Asc(Mid$(strPlainTxt, i, 1))
Select Case method
Case "d":
c = c - Asc(Mid$(strKey, (i Mod Len(strKey)) + 1, 1))
Case "e":
c = c + Asc(Mid$(strKey, (i Mod Len(strKey)) + 1, 1))
End Select
strBuff = strBuff + Chr$(c And &HFF)
Next i
Else
strBuff = strPlainTxt
End If
STR_CRYPT$ = strBuff
End Function
Well not sure I can answer your question but here is a tip:
c = Asc(Mid$(strPlainTxt, i, 1))
can be written as c = Asc(strPlainTxt,i) which might save time and add clarity.
In QB64 ASC() is not restricted to first char anymore.