亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? clscryptoapi.cls

?? 程序加密算法
?? CLS
?? 第 1 頁 / 共 5 頁
字號:
VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
  Persistable = 0  'NotPersistable
  DataBindingBehavior = 0  'vbNone
  DataSourceBehavior  = 0  'vbNone
  MTSTransactionMode  = 0  'NotAnMTSObject
END
Attribute VB_Name = "clsCryptoAPI"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = True
Attribute VB_Ext_KEY = "SavedWithClassBuilder6" ,"Yes"
Attribute VB_Ext_KEY = "Top_Level" ,"Yes"
Option Explicit

' ***************************************************************************
' Module:        clsCryptoAPI.cls
'
' Description:   This module is used to make calls to the the advapi32.dll
'                where the functions for CryptoAPI reside.
'
'                Always give credit where credit is due.  If you attach your
'                creditials to a piece of code, you should be available to
'                answer questions concerning that code.
'
' Thanks to:     Phil Fresle http://www.frez.co.uk
'                            Found a lot of good code snippets at his site.
'                            Some you will recognize in this module.
'                Kevin Matthew Goss
'                            His hashing routine pointed me in the right
'                            direction.
'                Alex Rohr   arohr@ub2b.com
'                            Collected ideas from his file encryption class.
' ===========================================================================
'    DATE      NAME / eMAIL
'              DESCRIPTION
' -----------  --------------------------------------------------------------
' 29-DEC-2000  Kenneth Ives  kenaso@home.com
'              Original module
' 10-JUL-2001  Kenneth Ives  kenaso@home.com
'              Converted to a DLL
' 09-SEP-2001  Kenneth Ives  kenaso@home.com
'              Enhanced and fixed some minor bugs
' ***************************************************************************

' ---------------------------------------------------------------------------
' Module level variables
' ---------------------------------------------------------------------------
  Private m_blnEnhancedProvider   As Boolean
  Private m_blnBlockCipher        As Boolean
  Private m_blnUseDefaultPWD      As Boolean
  Private m_lngCryptContext       As Long
  Private m_strInputData          As String
  Private m_abytOutputData()      As Byte
  Private m_abytPWord()           As Byte
  
  ' Export keys
  Private Const SIMPLEBLOB        As Long = 1
  Private Const PUBLICKEYBLOB     As Long = 6
  Private Const PRIVATEKEYBLOB    As Long = 7
  Private Const PLAINTEXTKEYBLOB  As Long = 8

  ' Algorithm classes
  Private Const ALG_CLASS_ANY           As Long = 0
  Private Const ALG_CLASS_SIGNATURE     As Long = 8192
  Private Const ALG_CLASS_MSG_ENCRYPT   As Long = 16384
  Private Const ALG_CLASS_DATA_ENCRYPT  As Long = 24576
  Private Const ALG_CLASS_HASH          As Long = 32768

  ' Algorithm types
  Private Const ALG_TYPE_ANY      As Long = 0
  Private Const ALG_TYPE_BLOCK    As Long = 1536
  Private Const ALG_TYPE_STREAM   As Long = 2048

  ' Block cipher IDs
  Private Const ALG_SID_DES       As Long = 1
  Private Const ALG_SID_RC2       As Long = 2
  Private Const ALG_SID_3DES      As Long = 3
  Private Const ALG_SID_3DES_112  As Long = 9

  ' Stream cipher IDs
  Private Const ALG_SID_RC4       As Long = 1

  ' Hash IDs
  Private Const ALG_SID_MD2       As Long = 1
  Private Const ALG_SID_MD4       As Long = 2
  Private Const ALG_SID_MD5       As Long = 3
  Private Const ALG_SID_SHA       As Long = 4
  Private Const ALG_SID_SHA1      As Long = 4
  Private Const HP_HASHVAL        As Long = 2
  
  ' Hash algorithms
  Private Const CALG_MD2          As Long = ALG_CLASS_HASH Or ALG_TYPE_ANY Or ALG_SID_MD2
  Private Const CALG_MD4          As Long = ALG_CLASS_HASH Or ALG_TYPE_ANY Or ALG_SID_MD4
  Private Const CALG_MD5          As Long = ALG_CLASS_HASH Or ALG_TYPE_ANY Or ALG_SID_MD5
  Private Const CALG_SHA          As Long = ALG_CLASS_HASH Or ALG_TYPE_ANY Or ALG_SID_SHA
  Private Const CALG_SHA1         As Long = ALG_CLASS_HASH Or ALG_TYPE_ANY Or ALG_SID_SHA1
  
  ' Block ciphers
  Private Const CALG_RC2          As Long = ALG_CLASS_DATA_ENCRYPT Or ALG_TYPE_BLOCK Or ALG_SID_RC2
  Private Const CALG_DES          As Long = ALG_CLASS_DATA_ENCRYPT Or ALG_TYPE_BLOCK Or ALG_SID_DES
  Private Const CALG_3DES         As Long = ALG_CLASS_DATA_ENCRYPT Or ALG_TYPE_BLOCK Or ALG_SID_3DES
  Private Const CALG_3DES_112     As Long = ALG_CLASS_DATA_ENCRYPT Or ALG_TYPE_BLOCK Or ALG_SID_3DES_112
  
  ' Stream cipher
  Private Const CALG_RC4          As Long = ALG_CLASS_DATA_ENCRYPT Or ALG_TYPE_STREAM Or ALG_SID_RC4

  ' CryptSetProvParam
  Private Const PROV_RSA_FULL        As Long = 1

  ' used when aquiring the provider
  Private Const CRYPT_VERIFYCONTEXT  As Long = &HF0000000
  Private Const CRYPT_NEWKEYSET      As Long = &H8&

  ' Microsoft provider data
  Private Const MS_DEFAULT_PROVIDER  As String = _
                "Microsoft Base Cryptographic Provider v1.0"
                              
  Private Const MS_ENHANCED_PROVIDER As String = _
                "Microsoft Enhanced Cryptographic Provider v1.0"
  
' ---------------------------------------------------------------------------
' Error codes
' ---------------------------------------------------------------------------
  Private Const ERR_CONTEXTOPEN          As Long = 100
  Private Const ERR_LOCKED               As Long = 101
  Private Const ERR_NOCONTEXT            As Long = 102
  Private Const ERR_KEYNOTVALID          As Long = 103

' ---------------------------------------------------------------------------
' Numbers defined by GetLastError
' ---------------------------------------------------------------------------
  Private Const ERROR_BUSY               As Long = 170
  Private Const ERROR_INVALID_PARAMETER  As Long = 87
  Private Const ERROR_NOT_ENOUGH_MEMORY  As Long = 8
  Private Const ERROR_MORE_DATA          As Long = 234
  Private Const NTE_BAD_DATA             As Long = &H80090005

' ---------------------------------------------------------------------------
' Error messages
' ---------------------------------------------------------------------------
  Private Const ERROR_AQUIRING_CONTEXT    As String = "Could not acquire context"
  Private Const ERROR_CREATING_HASH       As String = "Could not create hash"
  Private Const ERROR_CREATING_HASH_DATA  As String = "Could not create hash data"
  Private Const ERROR_DERIVING_KEY        As String = "Could not derive key"
  Private Const ERROR_ENCRYPTING_DATA     As String = "Could not encrypt data"
  Private Const ERROR_DECRYPTING_DATA     As String = "Could not decrypt data"
  Private Const ERROR_INVALID_HEX_STRING  As String = "Not a valid hex string"
  Private Const ERROR_MISSING_PARAMETER   As String = "Both a string and a key are required"
  Private Const ERROR_BAD_ENCRYPTION_TYPE As String = "Invalid encryption type specified"

' ---------------------------------------------------------------------------
' Declares
' ---------------------------------------------------------------------------
  ' CopyMemory moves the contents of a portion of memory from one location
  ' to another. The two locations are identified by pointers to the memory
  ' addresses. After the copy, the original contents in the source are set
  ' to zeros.
  '
  ' Useful whenever you want to move a block of bytes between two memory
  ' locations.  When the source or the destination is an array of numbers
  ' (or of UDTs that contains only numeric and fixed-length strings), you
  ' must pass the first element of the array by reference.  Example below
  ' depicts zero based arrays.
  '
  ' Copy the first 1000 elements of array a() to b().  Both arrays must be
  ' of the same type, and cannot be objects or variable-length strings.
  '
  '    CopyMemory b(0), a(0), 1000 * Len(a(0))
  '
  Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" _
          (dest As Any, source As Any, ByVal bytes As Long)

  ' The GetTickCount() API will capture the time in milliseconds.  The
  ' counter overflows after 1192.8 hours (49.7 days) from the last reboot.
  Private Declare Function GetTickCount Lib "kernel32" () As Long

  ' The GetLastError function returns the calling thread's last-error
  ' code value.  Most Win32 functions set their calling thread's
  ' last-error value when they fail; a few functions set it when they
  ' succeed.  You should call the GetLastError function immediately when
  ' a function's return value indicates that such a call will return
  ' useful data. That is because some functions call SetLastError(0) when
  ' they succeed, wiping out the error code set by the most recently
  ' failed function.
  Private Declare Function GetLastError Lib "kernel32" () As Long

  ' The CryptHashData function adds data to a specified hash object.
  ' This function and CryptHashSessionKey can be called multiple
  ' times to compute the hash of long or discontinuous data streams.
  Private Declare Function CryptHashData Lib "advapi32.dll" _
          (ByVal hhash As Long, ByVal pbData As String, _
          ByVal dwDataLen As Long, ByVal dwFlags As Long) As Long

  ' Alias of CryptHashData
  Private Declare Function CryptHashDataString Lib "advapi32.dll" _
          Alias "CryptHashData" (ByVal hhash As Long, _
          ByVal bData As String, ByVal dwDataLen As Long, _
          ByVal dwFlags As Long) As Long

  ' Alias of CryptHashData
  Private Declare Function CryptHashDataBytes Lib "advapi32.dll" _
          Alias "CryptHashData" (ByVal hhash As Long, _
          bData As Byte, ByVal dwDataLen As Long, _
          ByVal dwFlags As Long) As Long

  ' The CryptCreateHash function initiates the hashing of a stream of
  ' data. It creates and returns to the calling application a handle
  ' to a CSP hash object. This handle is used in subsequent calls to
  ' CryptHashData and CryptHashSessionKey to hash session keys and
  ' other streams of data.
  Private Declare Function CryptCreateHash Lib "advapi32.dll" _
          (ByVal hProv As Long, ByVal algid As Long, _
          ByVal hkey As Long, ByVal dwFlags As Long, _
          ByRef phHash As Long) As Long

  ' The CryptSignHash function signs data. Because all signature
  ' algorithms are asymmetric and thus slow, the CryptoAPI does not
  ' allow data be signed directly. Instead, data is first hashed and
  ' CryptSignHash is used to sign the hash.
  Private Declare Function CryptSignHash Lib "advapi32.dll" _
          Alias "CryptSignHashA" (ByVal hhash As Long, _
          ByVal hkey As Long, ByVal Description As Long, _
          ByVal dwFlags As Long, ByVal pData As Long, _
          dwDataLength As Long) As Long

  ' The CryptVerifySignature function verifies the signature of a
  ' hash object.  Before calling this function, CryptCreateHash must be
  ' called to create the handle of a hash object. CryptHashData or
  ' CryptHashSessionKey is then used to add data or session keys to the
  ' hash object.
  Private Declare Function CryptVerifySignature Lib "advapi32.dll" _
          Alias "CryptVerifySignatureA" (ByVal hhash As Long, _
          ByVal pData As Long, ByVal datalength As Long, _
          ByVal PublicKey As Long, ByVal Description As Long, _
          ByVal dwFlags As Long) As Long

  ' The CryptGetHashParam function retrieves data that governs the
  ' operations of a hash object. The actual hash value can be
  ' retrieved by using this function.
  Private Declare Function CryptGetHashParam Lib "advapi32.dll" _
          (ByVal hhash As Long, ByVal dwParam As Long, ByVal pbData As String, _
          pdwDataLen As Long, ByVal dwFlags As Long) As Long
  
  ' Alias of CryptGetHashParam
  Private Declare Function CryptGetHashParamSize Lib "advapi32.dll" _
          Alias "CryptGetHashParam" (ByVal hhash As Long, _
          ByVal dwParam As Long, pbData As Long, _
          dwDataLength As Long, ByVal dwFlags As Long) As Long

  'The CryptDestroyHash function destroys the hash object referenced
  ' by the hHash parameter. After a hash object has been destroyed,
  ' it can no longer be used.  The destruction of hash objects after
  ' their use is finished is recommended for security reasons.
  Private Declare Function CryptDestroyHash Lib "advapi32.dll" _
          (ByVal hhash As Long) As Long
    
  ' The CryptAcquireContext function is used to acquire a handle to a
  ' particular key container within a particular cryptographic service
  ' provider (CSP). This returned handle can then be used to make
  ' calls to the selected CSP.  This function performs two operations.
  ' It first attempts to find a CSP with the characteristics described
  ' in the dwProvType and pszProvider parameters. If the CSP is found,
  ' the function attempts to find a key container within the CSP
  ' matching the name specified by the pszContainer parameter.  With the
  ' appropriate setting of dwFlags, this function can also create and
  ' destroy key containers.
  Private Declare Function CryptAcquireContext Lib "advapi32.dll" _
          Alias "CryptAcquireContextA" (ByRef phProv As Long, _
          ByVal pszContainer As String, ByVal pszProvider As String, _
          ByVal dwProvType As Long, ByVal dwFlags As Long) As Long

  ' The CryptReleaseContext function releases the handle of a
  ' cryptographic service provider (CSP) and a key container. At each
  ' call to this function, the reference count on the CSP is reduced
  ' by one. When the reference count reaches zero, the context is fully
  ' released and it can no longer be used by any function in the application.
  ' An application calls this function after finishing the use of the CSP.
  ' After this function is called, the released CSP handle is no longer

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲国产精华液网站w| 欧美一级久久久| 亚洲欧洲av在线| 97精品国产97久久久久久久久久久久| 日韩美女久久久| 91国模大尺度私拍在线视频| 亚洲影视在线观看| 欧美日本在线一区| 蜜臀av性久久久久蜜臀aⅴ| 精品少妇一区二区三区视频免付费 | 日本不卡免费在线视频| 色综合久久久久综合| 亚洲成人自拍网| 日韩欧美国产一区在线观看| 国产一本一道久久香蕉| 亚洲人成网站色在线观看| 爽好久久久欧美精品| 67194成人在线观看| 精品在线播放免费| 国产精品乱人伦| 欧美日韩www| 懂色av一区二区三区免费看| 亚洲视频电影在线| 欧美一区二区三区在线看| 国产成人精品一区二区三区网站观看| 亚洲日本中文字幕区| 欧美一二三区在线| a级高清视频欧美日韩| 五月天久久比比资源色| 亚洲精品一区二区在线观看| 日本精品一级二级| 国内精品久久久久影院一蜜桃| 成人免费在线播放视频| 91精品国产手机| av不卡免费电影| 国产精品国产三级国产a| 欧美日韩日日骚| 欧美撒尿777hd撒尿| 国产一区欧美日韩| 亚洲视频1区2区| 久久久精品国产免大香伊 | 伊人色综合久久天天| 欧美高清视频在线高清观看mv色露露十八| 麻豆一区二区在线| 伊人开心综合网| 中文字幕成人av| 337p日本欧洲亚洲大胆精品| 在线观看视频欧美| 99热精品一区二区| 国产精华液一区二区三区| 亚洲1区2区3区视频| 国产日产精品一区| 日韩三级电影网址| 欧美日韩久久不卡| 91精品福利视频| 99久久国产综合精品色伊| 国产一区视频网站| 久久国产乱子精品免费女| 亚洲激情中文1区| 国产精品大尺度| 久久久久亚洲蜜桃| 日韩视频永久免费| 日韩欧美在线影院| 国内成+人亚洲+欧美+综合在线| 亚洲男同性视频| 国产欧美日韩卡一| 久久综合九色综合97婷婷 | 日韩欧美精品三级| 欧美美女一区二区在线观看| 91美女福利视频| 成人av电影免费观看| 成人黄色在线视频| 成人毛片视频在线观看| 国产成人99久久亚洲综合精品| 久草精品在线观看| 久久99日本精品| 久久精品噜噜噜成人av农村| 强制捆绑调教一区二区| 另类小说视频一区二区| 日韩福利视频导航| 日韩av中文在线观看| 日韩国产精品久久久| 美日韩一级片在线观看| 久久91精品国产91久久小草| 韩国v欧美v日本v亚洲v| 国产成人精品网址| 白白色 亚洲乱淫| 99re热这里只有精品免费视频| 99久久婷婷国产综合精品| 91视视频在线观看入口直接观看www | 成人av午夜影院| 国产风韵犹存在线视精品| 国产一区二区三区免费在线观看 | 国内精品不卡在线| 粉嫩aⅴ一区二区三区四区| 不卡的av电影在线观看| 欧美伊人久久大香线蕉综合69| 欧美羞羞免费网站| 91精品国产综合久久国产大片| 欧美电影免费观看高清完整版在线观看 | 精品国产髙清在线看国产毛片| 欧美精品一二三区| 日韩久久免费av| 日本一区二区视频在线| 亚洲天堂成人网| 日本午夜精品视频在线观看| 久久精品国产77777蜜臀| 国产一区日韩二区欧美三区| 91猫先生在线| 日韩欧美成人激情| 亚洲欧洲av在线| 日韩电影在线一区| 国产酒店精品激情| 欧美午夜不卡视频| 久久无码av三级| 亚洲伊人色欲综合网| 国产在线播放一区| 色999日韩国产欧美一区二区| 91精品国产色综合久久久蜜香臀| 久久中文娱乐网| 亚洲日本在线天堂| 精品在线观看免费| 在线一区二区三区四区| www亚洲一区| 亚洲成人一区在线| 成人午夜激情在线| 91麻豆精品久久久久蜜臀| 国产精品久久久久久亚洲伦| 性做久久久久久久久| 成人中文字幕电影| 日韩欧美不卡一区| 亚洲一二三专区| 成人性生交大片免费| 欧美日韩精品一区二区三区四区| 精品伊人久久久久7777人| 菠萝蜜视频在线观看一区| 正在播放亚洲一区| 亚洲美女屁股眼交| 国产精品一区二区三区99| 91精品国产欧美一区二区18| 日韩美女精品在线| 粉嫩在线一区二区三区视频| 欧美一区二区三区的| 亚洲综合小说图片| 高清不卡在线观看| 欧美精品一区男女天堂| 亚洲v日本v欧美v久久精品| www.色综合.com| 国产女人水真多18毛片18精品视频| 日韩二区三区在线观看| 欧美性大战久久久久久久| 亚洲精品自拍动漫在线| 国产91精品一区二区麻豆网站| 日韩一级高清毛片| 婷婷久久综合九色综合绿巨人 | 亚洲成av人影院| 91丝袜美腿高跟国产极品老师| 国产欧美日韩在线| 国产一区二区不卡在线| 精品国产制服丝袜高跟| 日韩av一二三| 91精品国产色综合久久久蜜香臀| 亚洲国产另类精品专区| 欧美视频在线播放| 一区二区久久久| 欧美亚一区二区| 视频一区中文字幕国产| 欧洲精品中文字幕| 亚洲国产成人av好男人在线观看| 色综合久久88色综合天天| 亚洲少妇最新在线视频| 99re热这里只有精品视频| 亚洲免费观看高清完整| 一本色道久久加勒比精品| 一个色在线综合| 欧美日韩午夜在线| 日韩中文字幕麻豆| 欧美tk—视频vk| 国产一区啦啦啦在线观看| 国产婷婷一区二区| k8久久久一区二区三区| 中文字幕在线一区| 色噜噜偷拍精品综合在线| 亚洲午夜一区二区| 日韩欧美成人一区二区| 国产黑丝在线一区二区三区| 国产精品欧美精品| 欧美日韩在线综合| 另类调教123区| 国产精品另类一区| 在线这里只有精品| 美女一区二区三区在线观看| 久久色在线观看| 91亚洲国产成人精品一区二三| 亚洲一区二区三区自拍| 日韩一区二区视频| 成人永久免费视频| 亚洲一区二区精品久久av| 精品国产一区二区三区久久久蜜月| 国产成人综合网|