Crypt加解密對象 方法: AESDecrypt() 原型:Function AESDecrypt(B() As Byte, KeyStringOrByteArray, , , ) As Boolean AESEncrypt() 原型:Function AESEncrypt(B() As Byte, KeyStringOrByteArray, , , ) As Boolean ArcFour() 原型:Sub ArcFour(B() As Byte, BK() As Byte, ) Base64Dec() 原型:Function Base64Dec(Base64Str As String, ) 說明:解密Base64,這個是比較常用的。很多東西常以base64加密的。如ie的mht文件,word2003的xml文件對圖像以base64加密(這個構(gòu)思真的很棒)。必須在access數(shù)據(jù)庫中儲存圖像, 建議以Base64加密后再存儲。(純屬個人建議) Base64Enc() 原型:Function Base64Enc(Data) As String 說明:加密Base64 CheckPrime() 原型:Function CheckPrime(Prime As String) As Boolean CreateRandomNumber() 原型:Function CreateRandomNumber( ) As String DiffieHellmanCreatePublicKey() 原型:Function DiffieHellmanCreatePublicKey() As String DiffieHellmanCreateSharedSecret() 原型:Function DiffieHellmanCreateSharedSecret() As String FastLZCompress() 原型:Sub FastLZCompress(BSrc() As Byte, BDst() As Byte) FastLZDecompress() 原型:Sub FastLZDecompress(BSrc() As Byte, BDst() As Byte) GenPrime() 原型:Function GenPrime( , , , , ) As String GetHashedPassword() 原型:Function GetHashedPassword(PassWord As String) As String GzCompress() 原型:Function GzCompress(Src() As Byte, Dst() As Byte) As Long 說明:常用于網(wǎng)絡(luò),壓縮減少網(wǎng)絡(luò)傳輸量,IIS支持對整個網(wǎng)站的Gz壓縮。IE支持對Gz文件的自動解壓 GzDecompress() 原型:Function GzDecompress(Src() As Byte, Dst() As Byte) As Long HMAC_MD5() 原型:Function HMAC_MD5(Message, Key, ) HMAC_SHA1() 原型:Function HMAC_SHA1(Message, Key, ) LZMAComp() 原型:Sub LZMAComp(BSrc() As Byte, BDst() As Byte, , ) LZMADeComp() 原型:Sub LZMADeComp(BSrc() As Byte, BDst() As Byte) MD5() 原型:Function MD5(Message, ) 說明:MD5加密,常用。不用到處找MD5的vba代碼了。 SHA1() 原型:Function SHA1(Message, ) SHA256() 原型:Function SHA256(Message, ) URLDecode() 原型:Function URLDecode(U As String) As String 說明:非常常用。 URLEncode() 原型:Function URLEncode(U As String) As String UTF8ToVBString() 原型:Function UTF8ToVBString(B() As Byte) As String 說明:網(wǎng)絡(luò)數(shù)據(jù)基本是以UTF8作為標準,跟網(wǎng)絡(luò)數(shù)據(jù)打交道,這個太常用了。 UTF8ToVBStringFromPtr() 原型:Function UTF8ToVBStringFromPtr(pUTF8 As Long, ByteLen As Long) As String 說明:以字符串指針進行字符串轉(zhuǎn)換。對于大數(shù)據(jù)的String轉(zhuǎn)換,性能會顯著提高。 VBStringToUTF8() 原型:Function VBStringToUTF8(S As String) As Byte() 說明:轉(zhuǎn)成UTF8。 ZlibCompress() Sub ZlibCompress(BSrc() As Byte, BDst() As Byte) 說明:常用,標準Zip加解壓。docx,xlsx,pptx不就是Zip文件嗎? ZLibDecompress() 原型:Sub ZLibDecompress(BSrc() As Byte, BDst() As Byte) 屬性 DiffieHellmanBase 原型:Property DiffieHellmanBase As String DiffieHellmanPrime 原型:Property DiffieHellmanPrime As String DiffieHellmanPrivate 原型:Property DiffieHellmanPrivate As String DiffieHellmanSharedSecret 原型:Property DiffieHellmanSharedSecret As String