Question : Generate a unique* key for a particular string

I would like to generate a unique* key for a particular string for example if the string is "Bob Smith" I would like the string to be axdg8654fg or something like that. Rather than being a random number it really needs to be based on a primer key (and probably be as simple as possible) so that else ware in the program if "Bob Smith" is referred to again the Same key would be generated.

I want to use it to prevent casual investigation of other users report data on a web site for example the following is not very private:
www.myweb.com/reports/bobsmith.html
www.myweb.com/reports/suesmith.html
www.myweb.com/reports/jameswilliams.html

Where as the example the following is would stop casual investigation by other users:
www.myweb.com/reports/52jhkg586.html
www.myweb.com/reports/kjgzdk55856.html
www.myweb.com/reports/hjyu76gfd.html

Again its to stop casual investigation.

Answer : Generate a unique* key for a particular string

Just call a function like the following. This is a reversible shrouding: 0 becomes h, and h becomes 0. There are more sophisticated transposition encryptions, of course. This is the basic ancient Roman stuff.

(°v°)
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
Option Compare Database
Option Explicit
 
Function Shroud(ByVal Text) As String
 
    Const Letter = "0123456789-_abcdefghijklmnopqrstuvwxyz"
    Const Transp = "h4ea19_kl5d63xf-2cn0ro78tgjsvipmzqybwu"
    Dim i As Integer, p As Integer
    
    For i = 1 To Len(Text)
        p = InStr(1, Letter, Mid(Text, i, 1))
        If p Then _
            Mid(Text, i, 1) = Mid(Transp, p, 1)
    Next i
    Shroud = Text
 
End Function
Random Solutions  
 
programming4us programming4us