B4X
B4X
Obfuscate String
Demonstrates how to obfuscate and unobfuscate a string.Chilkat B4X Downloads
Dim success As Boolean = False
Dim sb As ChilkatStringBuilder
sb.Initialize
Dim s As String = "Hello World!"
sb.Append(s)
Log(sb.GetAsString)
' Output is "Hello World!";
' Obfuscate the string.
' This is NOT encryption. It's just a simple obfuscation.
sb.Obfuscate
Log(sb.GetAsString)
' Output is 2GsgGhbSQVyG8Vb9
' -------------------------
' Unobfuscate.
Dim sb2 As ChilkatStringBuilder
sb2.Initialize
Dim s2 As String = "2GsgGhbSQVyG8Vb9"
sb2.Append(s2)
sb2.Unobfuscate
Log(sb2.GetAsString)
' Output is "Hello World!";