Crypt加解密对象
方法:
AESDecrypt()
原型:Function AESDecrypt(B() As Byte, KeyStringOrByteArray, [AESStrength As enmAESStrength = AES128], [InitVector16], [KeyHashingSHA256 As Boolean = True]) As Boolean
AESEncrypt()
原型:Function AESEncrypt(B() As Byte, KeyStringOrByteArray, [AESStrength As enmAESStrength = AES128], [InitVector16], [KeyHashingSHA256 As Boolean = True]) As Boolean
ArcFour()
原型:Sub ArcFour(B() As Byte, BK() As Byte, [Offset As Long])
Base64Dec()
原型:Function Base64Dec(Base64Str As String, [AsByteArr As Boolean])
说明:解密Base64,这个是比较常用的。很多东西常以base64加密的。如ie的mht文件,word2003的xml文件对图像以base64加密(这个构思真的很棒)。必须在access数据库中储存图像, 建议以Base64加密后再存储。(纯属个人建议)
Base64Enc()
原型:Function Base64Enc(Data) As String
说明:加密Base64
CheckPrime()
原型:Function CheckPrime(Prime As String) As Boolean
CreateRandomNumber()
原型:Function CreateRandomNumber([Range As String]) 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([OptPrimeDigits As Long = 60], [OptPrimeFactorCount As Long = 10], [OptSmallFactorCheckCount As Long = 200], [OptMaxRounds As Long = 2], [OptMod4Is3Criterium As Long]) As String
GetHashedPassword()
原型:Function GetHashedPassword(PassWord As String) As String
GzCompress()
原型:Function GzCompress(Src() As Byte, Dst() As Byte) As Long
说明:常用于网络,压缩减少网络传输量,IIS支持对整个网站的Gz压缩。IE支持对Gz文件的自动解压
GzDecompress()
原型:Function GzDecompress(Src() As Byte, Dst() As Byte) As Long
HMAC_MD5()
原型:Function HMAC_MD5(Message, Key, [AsHexStr As Boolean = True])
HMAC_SHA1()
原型:Function HMAC_SHA1(Message, Key, [AsHexStr As Boolean = True])
LZMAComp()
原型:Sub LZMAComp(BSrc() As Byte, BDst() As Byte, [Level_0to9 As Long = 4], [DictSizePowerOfTwo As Long = 4194304])
LZMADeComp()
原型:Sub LZMADeComp(BSrc() As Byte, BDst() As Byte)
MD5()
原型:Function MD5(Message, [AsHexStr As Boolean = True])
说明:MD5加密,常用。不用到处找MD5的vba代码了。
SHA1()
原型:Function SHA1(Message, [AsHexStr As Boolean])
SHA256()
原型:Function SHA256(Message, [AsHexStr As Boolean = True])
URLDecode()
原型:Function URLDecode(U As String) As String
说明:非常常用。
URLEncode()
原型:Function URLEncode(U As String) As String
UTF8ToVBString()
原型:Function UTF8ToVBString(B() As Byte) As String
说明:网络数据基本是以UTF8作为标准,跟网络数据打交道,这个太常用了。
UTF8ToVBStringFromPtr()
原型:Function UTF8ToVBStringFromPtr(pUTF8 As Long, ByteLen As Long) As String
说明:以字符串指针进行字符串转换。对于大数据的String转换,性能会显著提高。
VBStringToUTF8()
原型:Function VBStringToUTF8(S As String) As Byte()
说明:转成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