图像的base64德codeR为ASP经典 [英] base64 image decoder for ASP classic

查看:276
本文介绍了图像的base64德codeR为ASP经典的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

任何一个可以告诉我如何脱code在传统的ASP一个base64连接codeD映像?该图像是通过连接的Java org.apache的base64类codeD。该Java使用RFC 2045的base64进行解码。

Can any one tell me how to decode a base64 encoded image in classic ASP? The image is encoded by Java org.apache base64 class. The Java uses RFC 2045 for base64 decoding.

推荐答案

您可以使用CAPICOM COM对象。我一直在使用它的反向(base64编码)。
这是我会做什么(如果你有一个大循环,你最好有做的CreateObject外循环,但在简单的情况下,这应该这样做):

You can use the Capicom COM object. I've been using it to to the reverse (base64 encoding). This is what I would do (if you've got a big loop, you'd better have the CreateObject done outside the loop, but in simple cases this should do it):

Function Base64Decode(encodedString)
    Dim caputil : Set caputil = CreateObject("CAPICOM.Utilities")
    If len(encodedString) > 0 Then
        Base64Decode = caputil.Base64Decode(encodedString)
    Else
        Base64Decode = ""
    End If
    Set caputil = Nothing
End Property

参考: http://msdn.microsoft .COM / EN-US /库/ aa388176(v = vs.85)的.aspx

顺便说一句,可以的CAPICOM.dll从MS网站下载:<一href=\"http://www.microsoft.com/downloads/en/details.aspx?FamilyID=860ee43a-a843-462f-abb5-ff88ea5896f6\" rel=\"nofollow\">http://www.microsoft.com/downloads/en/details.aspx?FamilyID=860ee43a-a843-462f-abb5-ff88ea5896f6

By the way, capicom.dll can be downloaded from MS site : http://www.microsoft.com/downloads/en/details.aspx?FamilyID=860ee43a-a843-462f-abb5-ff88ea5896f6

这篇关于图像的base64德codeR为ASP经典的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆