Public Function EnCodeStr(ByVal password As String) As String
Dim il_bit, il_x, il_y, il_z, il_len, i As Long
Dim is_out As String
il_len = Len(password)
il_x = 0
il_y = 0
is_out = ""
For i = 1 To il_len
il_bit = AscW(Mid(password, i, 1))
il_y = (il_bit * 13 Mod 256) + il_x
is_out = is_out & ChrW(Fix(il_y))
il_x = il_bit * 13 / 256
Next
is_out = is_out & ChrW(Fix(il_x))
password = is_out
il_len = Len(password)
il_x = 0
il_y = 0
is_out = ""
For i = 1 To il_len
il_bit = AscW(Mid(password, i, 1))
il_y = il_bit / 16 + 64
is_out = is_out & ChrW(Fix(il_y))
il_y = (il_bit Mod 16) + 64
is_out = is_out & ChrW(Fix(il_y))
Next
EnCodeStr = is_out
End Function Public Function DeCodeStr(ByVal password As String) As String
Dim is_out As String
Dim il_x, il_y, il_len, i, il_bit As Long il_len = Len(password)
il_x = 0
il_y = 0
is_out = ""
For i = 1 To il_len Step 2
il_bit = AscW(Mid(password, i, 1))
il_y = (il_bit - 64) * 16
il_y = il_y + AscW(Mid(password, i + 1, 1)) - 64
is_out = is_out & ChrW(il_y)
Next il_x = 0
il_y = 0
password = is_out
is_out = "" il_len = Len(password)
il_x = AscW(Mid(password, il_len, 1)) For i = (il_len - 1) To 1 Step -1
il_y = il_x * 256 + AscW(Mid(password, i, 1))
il_x = il_y Mod 13
is_out = ChrW(Fix(il_y / 13)) & is_out
Next
DeCodeStr = is_out
End Function

  

VB6 加密解密字符串的更多相关文章

  1. PHP的加密解密字符串函数

    程序中经常使用的PHP加密解密字符串函数 代码如下: /********************************************************************* 函数 ...

  2. php 加密解密字符串

    /********************************************************************* 函数名称:encrypt 函数作用:加密解密字符串 使用方 ...

  3. Java加密解密字符串

    http://www.cnblogs.com/vwpolo/archive/2012/07/18/2597232.html Java加密解密字符串   旧文重发:http://www.blogjava ...

  4. django删除表重建&修改用户密码&base64加密解密字符串&ps aux参数说明&各种Error例子

    1.django的queryset不支持负索引 AssertionError: Negative indexing is not supported. 2.django向前端JavaScript传递列 ...

  5. PHP_加密解密字符串

    PHP_加密解密字符串.php <?php //加解密字符串函数,可以加密中文 /* //加密 echo $encode = authcode('爱迪生', 'ENCODE', '3'); // ...

  6. PHP加密解密字符串

    项目中有时我们需要使用PHP将特定的信息进行加密,也就是通过加密算法生成一个加密字符串,这个加密后的字符串可以通过解密算法进行解密,便于程序对解密后的信息进行处理. 最常见的应用在用户登录以及一些AP ...

  7. [DEncrypt] RSACryption--RSA加密/解密字符串 (转载)

    点击下载 RSACryption.zip 这个类是关于加密,解密的操作,文件的一些高级操作1.RSACryption RSA 的密钥产生2.RSACryption RSA的加密函数3.RSACrypt ...

  8. .net core 使用MD5加密解密字符串

    /// <summary> /// 加密 /// </summary> /// <param name="Text">要加密的文本</pa ...

  9. MD5 加密解密字符串

    方法1: using System.Text; using System.Security.Cryptography; public string Hash(string toHash) { MD5C ...

随机推荐

  1. svn和ftp的不同应用场合

    作者:朱金灿 来源:http://blog.csdn.net/clever101 本来二者不是同一类的东西,是不能比较.引发我思考的是部门一些同事错把svn工具作为一个文件共享工具.因此我在思考一个问 ...

  2. Salesforce中的单点登录简介

    单点登录的定义 引自维基百科: 单点登录(英语:Single sign-on,缩写为 SSO),又译为单一签入,一种对于许多相互关连,但是又是各自独立的软件系统,提供访问控制的属性.当拥有这项属性时, ...

  3. MVC与单元测试实践之健身网站(七)-添加计划

    ​计划的制定涉及到周期-动作包-动作的关联操作,在上一篇<计划的添加与重置>完成了周期的设置.动作包的添加,现在要完成的是动作的添加操作. 一 具体功能 a) 在选定了一个大周期具有的天数 ...

  4. [20170828]grep过滤技巧.txt

    [20170828]grep过滤技巧.txt --//经常使用grep过滤显示信息. #  ps -ef |grep oraagentoracle    13416      1  0  2016 ? ...

  5. SOAP REST

    SOAP是基于RPC原理,是传统程序的函数调用和返回在RPC中被请求和应答代替了而已. SOAP Simple Object Access Protocol,是一种严格定义的信息交换协议,用于在web ...

  6. 找Maven --> pom.xml --> groupId和artifactId的网站

    http://mvnrepository.com/ 在此记录

  7. 在ASP.NET Core 2.0 web项目中使用EntityFrameworkCore

    一.安装EFCode包 EFCore需要根据不同的数据库选择不同的数据库提供程序database provider,各数据库的包地址:https://docs.microsoft.com/zh-cn/ ...

  8. 薛兆丰吴军何帆曾鸣万维刚李笑来罗永浩等得到APP专栏作者的书23本

    最近看了何帆的<大局观>,是他在得到APP的专栏文章的精选.顺便整理以下最近两三年内看过的得到APP其他专栏与课程作者的得到精选文集和他们写过的其他的书共23本. 薛兆丰 4星|<薛 ...

  9. Spring Component注解处理过程

    接下来: org.springframework.context.annotation.ComponentScanBeanDefinitionParser#parse方法展开加载过程:

  10. HDU - 5078 水题

    题意:最大困难=距离 / 相邻时间 #include<cstring> #include<cstdio> #include<cmath> #define ll do ...