AutoIt
AutoIt
Get Contents of File as Base64
See more Encryption Examples
Demonstrates how to read the contents of a file and convert to a base64 string.Chilkat AutoIt Downloads
Local $bSuccess = False
$oBd = ObjCreate("Chilkat.BinData")
$bSuccess = $oBd.LoadFile("qa_data/jpg/starfish.jpg")
If ($bSuccess = False) Then
ConsoleWrite("Failed to load file." & @CRLF)
Exit
EndIf
ConsoleWrite($oBd.GetEncoded("base64") & @CRLF)
; If you want mult-line base64:
ConsoleWrite("--" & @CRLF)
ConsoleWrite($oBd.GetEncoded("base64_mime") & @CRLF)
; If you want hex..
ConsoleWrite("--" & @CRLF)
ConsoleWrite($oBd.GetEncoded("hex") & @CRLF)
; etc.