Sample code for 30+ languages & platforms
VBScript

Example: Crypt2.DecodeString method

Demonstrates how to call the DecodeString method.

Chilkat VBScript Downloads

VBScript
Dim fso, outFile
Set fso = CreateObject("Scripting.FileSystemObject")
'Create a Unicode (utf-16) output text file.
Set outFile = fso.CreateTextFile("output.txt", True, True)

set crypt2 = CreateObject("Chilkat.Crypt2")

' The string "Hello World" in base64 (using the utf-8 byte representation) is "SGVsbG8gV29ybGQ="

encodedStr = "SGVsbG8gV29ybGQ="
encoding = "base64"
charset = "utf-8"

str = crypt2.DecodeString(encodedStr,charset,encoding)
outFile.WriteLine(str)

' Output is "Hello World"

outFile.Close