Base64 Encode String in VBScript

Posted by Patrick Cuff on Stack Overflow See other posts from Stack Overflow or by Patrick Cuff
Published on 2009-01-30T19:01:22Z Indexed on 2010/05/31 20:03 UTC
Read the original article Hit count: 460

Filed under:
|
|
|

I have a web service load driver that's a Windows Script File (WSF), that includes some VBScript and JavaScript files. My web service requires that the incoming message is base64 encoded. I currently have a VBScript function that does this, but it's very inefficient (memory intensive, mostly due to VBScripts awful string concatenation)

[Aside; Yes, I've seen Jeff's latest blog post. The concatenation is happening in a loop across messages that are 1,000's to 10,000's bytes in size.]

I've tried using some custom string concatenation routines; one using an array and one using ADODB.Stream. These help, a little, but I think it would help more if I had some other way of encoding the message rather than via my own VBS function.

Is there some other way of encoding my message, preferebly using native Windows methods?

© Stack Overflow or respective owner

Related posts about encoding

Related posts about vbscript