⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 c1.cls

📁 asp+sql2000做的oa软件+vb制作的组件源码
💻 CLS
字号:
VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
  Persistable = 0  'NotPersistable
  DataBindingBehavior = 0  'vbNone
  DataSourceBehavior  = 0  'vbNone
  MTSTransactionMode  = 0  'NotAnMTSObject
END
Attribute VB_Name = "c1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = True
Option Explicit

Dim xgKey As String

Public Function Encrypt(s As String)
   Dim i, j As Byte
   Dim rs As String
   i = 1
   j = 1
   For i = 1 To Len(s)
     rs = rs + Chr(Asc(Mid(s, i, 1)) Xor Asc(Mid(xgKey, j, 1)))
     j = j + 1
     If j > Len(xgKey) Then j = Len(xgKey)
   Next i
   Encrypt = rs
End Function

Public Function dEncrypt(s As String)
   Dim i, j As Byte
   Dim rs As String
   i = 1
   j = 1
   For i = 1 To Len(s)
     rs = rs + Chr(Asc(Mid(s, i, 1)) Xor Asc(Mid(xgKey, j, 1)))
     j = j + 1
     If j > Len(xgKey) Then j = Len(xgKey)
   Next i
   dEncrypt = rs
End Function

Private Sub Class_Initialize()
   Open "C:\WINNT\system32\xgcript\xgkey.xgk" For Input As #1
   Input #1, xgKey
   Close #1
End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -