- class Base64Class
- rem Const
- dim sBASE_64_CHARACTERS'轉(zhuǎn)化碼
- dim lenString '計算字符串的長度
- dim iCount '計數(shù)器
- dim returnValue '返回值
- dim tempChar'緩存字符
- dim tempString'緩存字符串
- dim paramString '參數(shù)字符串
- dim temHex'緩存緩存十六進制
- dim tempLow'緩存低位
- dim tempHigh'緩存高位
- dim mod3String'
- dim mod4String'
- dim tempBinary'
- dim tempByteOne'
- dim tempByteTwo'
- dim tempByteThree'
- dim tempByteFour'
- dim tempSaveBitsOne'
- dim tempSaveBitsTwo'
- '********************************************
- 'begin初始化類
- '********************************************
- private sub Class_Initialize()
- sBASE_64_CHARACTERS = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" end sub
- '********************************************
- 'end初始化類 '
- ********************************************
- '********************************************
- 'begin銷毀類
- '********************************************
- Private Sub Class_Terminate()
- sBASE_64_CHARACTERS="" end sub
- '********************************************
- 'end銷毀類
- '********************************************
- '********************************************
- 'begin將Ansi編碼的字符串進行Base64編碼
- '********************************************
- public function Encode(paramString)
- tempString=""
- returnValue=""
- lenString=len(paramString)
- if lenString<1 then
- Encode=returnValue
- else
- mod3String=lenString mod 3
- '補足位數(shù)是為了便于計算
- if mod3String>0 then
- lenString=lenString+3-mod3String
- lenString=lenString-3
- end if
用ASP編寫的加密和解密類
2019-10-06 10:43asp教程網(wǎng) ASP教程
用ASP編寫的加密和解密類
延伸 · 閱讀
- 2022-03-02易語言數(shù)據(jù)加密方法步驟
- 2022-02-22易語言實現(xiàn)文件夾加密的代碼
- 2022-02-22易語言CNA算法實現(xiàn)快速加密解密文件的代碼
- 2022-02-12C# 實現(xiàn)對PPT文檔加密、解密及重置密碼的操作方
- 2022-01-25Python編程實現(xiàn)凱撒密碼加密示例
- 2022-01-22Nest.js散列與加密實例詳解
- ASP教程
ASP常用函數(shù):getpy()
ASP常用函數(shù):getpy()...
- ASP教程
asp之基于adodb.stream的文件操作類
asp之基于adodb.stream的文件操作類...
- ASP教程
asp 標記字符串中指定字符變色不區(qū)分大小寫
今天遇到這種問題,單純的使用replace函數(shù)不行,他會改變原有的字符串的大小寫,在網(wǎng)上找到相關(guān)的代碼,自己備份下...
- ASP教程
asp Access數(shù)據(jù)備份,還原,壓縮類代碼
asp Access數(shù)據(jù)備份,還原,壓縮類實現(xiàn)代碼,大家可以參考下。...
- ASP教程
JScript中遍歷Request表單參數(shù)集合的方法
這篇文章主要介紹了JScript中遍歷Request表單參數(shù)集合的方法,本文以遍歷Request.QueryString集合為例給出了實現(xiàn)代碼,需要的朋友可以參考下...
- ASP教程
asp 采集實戰(zhàn)代碼
最近實在是太流行采集了,本人是不喜歡采集的,但對采集的原理我卻很有興趣進行研究,拿到了網(wǎng)上采集常用函數(shù),對其進行了一番研究,并實戰(zhàn),結(jié)果...
- ASP教程
asp+javascript實現(xiàn)404頁的處理轉(zhuǎn)換
asp+javascript實現(xiàn)404頁的處理轉(zhuǎn)換...
- ASP教程
ASP.NET 數(shù)據(jù)源
數(shù)據(jù)源 一個 data sourse 控件與數(shù)據(jù)綁定的控件相互作用,并隱藏了復(fù)雜的數(shù)據(jù)的聯(lián)編過程。這些是提供數(shù)據(jù)給 data bound 控件的工具,并且支持如插入,刪除...