Posted By

crackiron on 05/15/11


Tagged

crypto Trithemius


Versions (?)

deTritemius


 / Published in: VB.NET
 

  1. Function deTrithemius(ByVal str As String) As String
  2.  
  3. Dim res As String = ""
  4. Dim table As String = "ABCDEFGHIJKLMNÑOPQRSTUVWXYZ"
  5. Dim i As Integer = 0
  6.  
  7. Dim pos As Integer
  8.  
  9. For Each c As Char In str
  10. If c <> " " Then
  11. pos = InStr(table, UCase(c)) - i
  12.  
  13. While pos < 0
  14. pos += Len(table)
  15. End While
  16.  
  17. res = res & Mid(table, pos, 1)
  18. i += 1
  19. Else
  20. res = res & " "
  21. End If
  22.  
  23. Next
  24. Return res
  25. End Function

Report this snippet  

You need to login to post a comment.