Chilkat2-Python
Chilkat2-Python
Obfuscate String
Demonstrates how to obfuscate and unobfuscate a string.Chilkat Chilkat2-Python Downloads
import chilkat2
success = False
sb = chilkat2.StringBuilder()
s = "Hello World!"
sb.Append(s)
print(sb.GetAsString())
# Output is "Hello World!";
# Obfuscate the string.
# This is NOT encryption. It's just a simple obfuscation.
sb.Obfuscate()
print(sb.GetAsString())
# Output is 2GsgGhbSQVyG8Vb9
# -------------------------
# Unobfuscate.
sb2 = chilkat2.StringBuilder()
s2 = "2GsgGhbSQVyG8Vb9"
sb2.Append(s2)
sb2.Unobfuscate()
print(sb2.GetAsString())
# Output is "Hello World!";