存档
Const BASE_64_CHARACTERS = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"
Private sBASE_64_CHARACTERS
Function Base64encode(ByVal asContents)
asContents = strUnicode2Ansi(asContents)
Dim lnPosition,lsResult,Char1,Char2,Char3,Char4,Byte1,Byte2,Byte3,SaveBits1,SaveBits2,lsGroupBinary,lsGroup64,M4, len1, len2
len1 = LenB(asContents)
If len1 < 1 Then
Base64encode = ""
Exit Function
[...]
在很多场合,特别重要的要加密传输。使用成熟的加密算法是一个不错的选择,但是~ 有些算法这个语言支持而另一种语言不支持。或者直接要安装某某组件,实在是太烦琐了,为了方便以后使用,自己抽空写了一个。
最近经常需要开发API,Microsoft.XMLHttp、MSXML2.XMLHTTP 等组件不能满足我的要求(主要是不能自定义header等信息),通过查资料发现了WinHttp.WinHttpRequest.5.1,但是关于winhttprequest的资料太少了。通过这几天摸索,勉强了解了WinHttpRequest使用方法。
自己写的ASP汉字转拼音的程序,支持部分不常见汉字的拼音。更多不常见汉字的拼音正在整理中,更新地址:http://www.miaoqiyuan.cn/product/update/pinyin.db.rar
‘=====================================================================
‘ 意见反馈地址:http://www.miaoqiyuan.cn/p/asp-pinyin
‘ 最新数据库:http://www.miaoqiyuan.cn/Products/update/pinyin.db.zip
‘=====================================================================
‘函数名:GET_PINYIN
‘ 功能:返回拼音
‘ 参数:word – 要转换的汉字,只支持一个汉字
Function GET_PINYIN(word)
if asc(word) > 0 and asc(word) < 128 then
GET_PINYIN = word
[...]