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. FreeSSHD login with permission denied

    登录遇到问题: Permission denied, please try again. 解决方法: 在window中使用freesshd开启ssh后,客户端登陆时报 access denied错误 ...

  2. 适用于 Azure 虚拟网络的常见 PowerShell 命令

    如果想要创建虚拟机,需要创建虚拟网络或了解可在其中添加 VM 的现有虚拟网络. 通常情况下,创建 VM 时,还需考虑创建本文所述资源. 有关安装最新版 Azure PowerShell.选择订阅和登录 ...

  3. python第七十一天---堡垒机

    堡垒机的表结构图:

  4. Linux永久修改系统时间

    1.date 查看系统时间 2.hwclock --show 查看硬件的时间 3.hwclock --set --date '2017-08-16 17:17:00' 设置硬件时间为17年8月16日1 ...

  5. Linux 小知识翻译 - 「Shell 脚本」

    这次说说「Shell 脚本」. 根据上回的介绍,Shell就是「作为联系Linux和用户的接口而存在的软件」.在Linux环境中,通过Shell来操作系统很普遍. 这里,考虑到有时候可能想要「多次的进 ...

  6. [BZOJ 3829][POI2014] FarmCraft

    先贴一波题面... 3829: [Poi2014]FarmCraft Time Limit: 20 Sec  Memory Limit: 128 MBSubmit: 421  Solved: 197[ ...

  7. [Tomcat]The JRE_HOME environment variable is not defined correctly

    在tomcat的bin目录下,双击startup.bat,闪一下,就没了,后来仔细看了一下黑屏闪的内容如下: the JRE_HOME environment variable is not defi ...

  8. <table>标签总结(colspan跨列 ,rowspan跨行)

    table标签有些内置属性要设置: <table cellpadding="0" cellspacing="0" border="0" ...

  9. File类_常见的方法(获取,创建与删除,判断,重命名)

    获取:  1.1获取文本名称  1.2获取文件路劲  1.3获取文件大小  1.4获取文件修改或创建时间 import java.io.File; import java.text.DateForma ...

  10. c++引用lib和dll的方法总结

    C++ 调用.lib的方法: 一: 隐式的加载时链接,有三种方法 1  LIB文件直接加入到工程文件列表中 在VC中打开File View一页,选中工程名,单击鼠标右键,然后选中"Add F ...