XML DOM
XML DOM Contents
Summary This code snippet presents VB6's class module to perform base64 encoding and decoding using MSXML.
Using code from this short article you can easily do the following:
- Perform base64 encoding - Perform base64 decoding - Perform conversion of a byte array to the string - Perform conversion of a scalar variable to the byte array
Base64 encoding/decoding becomes as easy as ABC:
Dim o As CBase64 ' base64 encoder/decoder class Dim strSrc As String ' source test string Dim strDst As String ' destination (base64 encoded) test string Dim strRes As String ' restored (base64 decoded) strDst
strSrc = Test string ' set value for test string Set o = New CBase64 ' create new instance on CBase64 class strDst = o.Encode(strSrc) ' encode strRes = o.Decode2Str(strDst) ' decode
In attachment you can find a test VB6 project.
Enjoy!
Partners
Dream.In.Code dotNet Slackers dotNet Spider Your HTML Source VisualBuilder.com DevGuru Planet Source Code ZVON.ORG Web Design ASPAlliance XML Pitstop Scripts
The Spot 4 SAP Bitshop Web Hosting