易截截图软件、单文件、免安装、纯绿色、仅160KB

MD5 加密算法 VB 实现代码

虽然现在MD5 加密算法严格来讲已经不算安全,但一般小功能或公司内部使用应该足够了 
Attribute VB_Name = "modMd5"
' MODULE:       CMD5
'*******************************************************************************
Option Explicit
Public Const BITS_TO_A_BYTE  As Long = 8
Public Const BYTES_TO_A_WORD As Long = 4
Public Const BITS_TO_A_WORD  As Long = BYTES_TO_A_WORD * BITS_TO_A_BYTE
Public m_lOnBits(0 To 30) As Long
Public m_l2Power(0 To 30) As Long
Public Function MD5_Encrypt(ByVal sText As String) As String
MD5_Init
MD5_Encrypt = MD5(sText)
End Function
'*******************************************************************************
' Class_Initialize (SUB)
'
' DESCRIPTION:
' We will usually get quicker results by preparing arrays of bit patterns and
' powers of 2 ahead of time instead of calculating them every time, unless of
' course the methods are only ever getting called once per instantiation of the
' class.
'*******************************************************************************
Public Sub MD5_Init()
    ' Could have done this with a loop calculating each value, but simply
    ' assigning the values is quicker - BITS SET from RIGHT
    m_lOnBits(0) = 1            ' 00000000000000000000000000000001
    m_lOnBits(1) = 3            ' 00000000000000000000000000000011
    m_lOnBits(2) = 7            ' 00000000000000000000000000000111
    m_lOnBits(3) = 15           ' 00000000000000000000000000001111
    m_lOnBits(4) = 31           ' 00000000000000000000000000011111
    m_lOnBits(5) = 63   &nb


相关文档:

求注释VB程序,只要大概整句意思即可,急用!!!

Option Explicit
Private rsMain As ADODB.Recordset
Private rsTerm As ADODB.Recordset
Private strSql As String
Private Sub cmdAbout_Click()
        frmAbout.Show
End Sub
Private Sub cmdAddObject_Click() '程序段
         ......

VB 6.0使用api

这一段大家编写程序很多时候都在使用API,它给我们带来了强大的功能.让我们非常惊喜.
但是我们在调试程序的时候有时候总会奔溃.这样很不方便.
其中有些是api惹的祸
使用api注意事项:
首先我说说我的观点.
1:Api是很多系统也在用.我们在设置参数时如果和系统的参数有冲突.就可能引起软件出错
2.api很多都是c语言编写的, ......

VB无所不能之六:对程序运行的监控 转

作者: 佚名,  出处:IT专家网, 责任编辑: 谢妍妍, 
2010-04-23 11:20
  本文介绍VB对程序运行的监控。
  转眼间,本系列文章已经写到了第六个,今天写点什么呢?
  还是得写,看似VB做不到的事情,那么今天起就写写VB对操作系统的控制吧。
  首先,说一说,VB对于被调用后的程序的监控方法。
  原型函数简 ......

VB局域网自动传播病毒


主窗体代码:
'打开网页
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
'复制文件
Private Declare Fu ......

VB开机运行程序

Option Explicit
Public Declare Function RegSetValueEx Lib "advapi32.dll" Alias "RegSetValueExA" (ByVal hKey As Long, ByVal lpValueName As String, ByVal Reserved As Long, ByVal dwType As Long, lpData As Any, ByVal cbData As Long) As Long
Public Declare Function RegCreateKey Lib "advapi32.dll" Alias ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号