I don't know if it works with other versions...
it's a function to encrypt/decrypt a string using a key...
original is the string to encrypt, operator is wether you encrypt or decrypt, and clef is a 6 different letters string (it'll work with other characters as well or with twice the same letter but you'll lose the last charater(s) of the array)

here's the code, paste it in your projects, have fun^^

VB Code:
  1. Public Function encription(original As String, operator As Boolean, clef As String)
  2.     If Len(clef) = 6 Then
  3.         Dim i, j, k As Long
  4.         Dim a1, a2, b1, b2, temp, intdecrypt(0 To 35) As Byte
  5.         Dim str, result, strdecrypt(0 To 5, 0 To 5) As String
  6.  
  7.         For i = 0 To 5
  8.             intdecrypt(i) = Asc(Mid(LCase(clef), i + 1, 1))
  9.         Next i
  10.  
  11.         temp = 97
  12.  
  13.         For i = 6 To 35
  14.             Do Until intdecrypt(i) <> 0
  15.                 If Not (intdecrypt(0) = temp Or intdecrypt(1) = temp Or intdecrypt(2) = temp Or intdecrypt(3) = temp Or intdecrypt(4) = temp Or intdecrypt(5) = temp) Then intdecrypt(i) = temp
  16.                 temp = temp + 1
  17.                 If temp = 123 Then temp = 32
  18.                 If temp = 35 Then temp = 39
  19.                 If temp = 42 Then temp = 44
  20.                 If temp = 47 Then temp = 63
  21.             Loop
  22.         Next i
  23.  
  24.         For i = 0 To 5
  25.             For j = 0 To 5
  26.                 strdecrypt(i, j) = Chr(intdecrypt((6 * i) + j))
  27.             Next j
  28.         Next i
  29.  
  30.         For i = 1 To Len(original)
  31.             Select Case Asc(Mid(original, i, 1))
  32.             Case 32 To 34, 39 To 41, 44 To 46, 63
  33.                 str = str & Mid(original, i, 1)
  34.             Case 65 To 90
  35.                 str = str & Chr(Asc(Mid(original, i, 1)) + 32)
  36.             Case 97 To 122
  37.                 str = str & Mid(original, i, 1)
  38.             End Select
  39.         Next i
  40.  
  41.         If Len(str) Mod 2 = 1 Then str = str & "q"
  42.  
  43.         For i = 1 To Len(str) Step 2
  44.             For j = 0 To 5
  45.                 For k = 0 To 5
  46.                     If Mid(str, i, 1) = strdecrypt(j, k) Then
  47.                     a1 = j
  48.                     a2 = k
  49.                     End If
  50.                 Next k
  51.             Next j
  52.             For j = 0 To 5
  53.                 For k = 0 To 5
  54.                     If Mid(str, i + 1, 1) = strdecrypt(j, k) Then
  55.                     b1 = j
  56.                     b2 = k
  57.                     End If
  58.                 Next k
  59.             Next j
  60.                 If operator = False Then
  61.                     result = result & strdecrypt(a2, b1) & strdecrypt(b2, a1)
  62.                 Else
  63.                     result = result & strdecrypt(b2, a1) & strdecrypt(a2, b1)
  64.                 End If
  65.         Next i
  66.  
  67.         If Not result = "" Then
  68.             If Mid(result, Len(result), 1) = "q" Then result = Left(result, Len(result) - 1)
  69.         End If
  70.  
  71.         encription = result
  72.     Else
  73.         encription = "clef invalide"
  74.     End If
  75. End Function

it can probably be optimized, but i thinks it's working well this way...

one way to call this script would be:

VB Code:
  1. MsgBox encription("hi guys", False, "abcdef")

hope you enjoy it
(i've also translated it in vbscript and am trying for other languages)