VB6 加密解密字符串
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 加密解密字符串的更多相关文章
- PHP的加密解密字符串函数
程序中经常使用的PHP加密解密字符串函数 代码如下: /********************************************************************* 函数 ...
- php 加密解密字符串
/********************************************************************* 函数名称:encrypt 函数作用:加密解密字符串 使用方 ...
- Java加密解密字符串
http://www.cnblogs.com/vwpolo/archive/2012/07/18/2597232.html Java加密解密字符串 旧文重发:http://www.blogjava ...
- django删除表重建&修改用户密码&base64加密解密字符串&ps aux参数说明&各种Error例子
1.django的queryset不支持负索引 AssertionError: Negative indexing is not supported. 2.django向前端JavaScript传递列 ...
- PHP_加密解密字符串
PHP_加密解密字符串.php <?php //加解密字符串函数,可以加密中文 /* //加密 echo $encode = authcode('爱迪生', 'ENCODE', '3'); // ...
- PHP加密解密字符串
项目中有时我们需要使用PHP将特定的信息进行加密,也就是通过加密算法生成一个加密字符串,这个加密后的字符串可以通过解密算法进行解密,便于程序对解密后的信息进行处理. 最常见的应用在用户登录以及一些AP ...
- [DEncrypt] RSACryption--RSA加密/解密字符串 (转载)
点击下载 RSACryption.zip 这个类是关于加密,解密的操作,文件的一些高级操作1.RSACryption RSA 的密钥产生2.RSACryption RSA的加密函数3.RSACrypt ...
- .net core 使用MD5加密解密字符串
/// <summary> /// 加密 /// </summary> /// <param name="Text">要加密的文本</pa ...
- MD5 加密解密字符串
方法1: using System.Text; using System.Security.Cryptography; public string Hash(string toHash) { MD5C ...
随机推荐
- How to deploy kotlin in androidstudio?
Kotlin is a good language,more playable than Java.So how do we deploy kotlin? First,install the kotl ...
- SpringMVC处理请求
HttpServletBean HttpServletBean主要参与了创建工作,并没有涉及请求的处理. FrameworkServlet FrameworkServlet的service方法里添加了 ...
- LeetCode题解之Insert into a Binary Search Tree
1.题目描述 2.分析 插入算法. 3.代码 TreeNode* insertIntoBST(TreeNode* root, int val) { insert(root, val); return ...
- 第五章 绘图基础(BEZIER)
/*----------------------------- BEZIER.C -- Bezier Splines Demo (c) Charles Petzold, 1998 ---------- ...
- 32_使用BeanUtils工具包操作JavaBean
由于对属性设置值和得到值的需求很多,使用频率很高,所以有一些开源勇士 不满足于JavaBean API 中IntroSpector来操作bean, 写出来了通用的BeanUtils工具,来进一步简 ...
- Python实现Excel转换工具小结
经历过的打表工具从c++.C#,再到Python,算下来还是Python方便些.一天即可上手开发,非常适合快速迭代中的各种小工具开发. Python开源的第三方库很多,涉及excel方面的也有好几个x ...
- [java大数据面试] 2018年4月百度面试经过+三面算法题:给定一个数组,求和为定值的所有组合.
给定一个数组,求和为定值的所有组合, 这道算法题在leetcode应该算是中等偏下难度, 对三到五年工作经验主要做业务开发的同学来说, 一般较难的也就是这种程度了. 简述经过: 不算hr面,总计四面, ...
- SpringMVC 常用applicationContext.xml、web.xml、servlet-mvc.xml简单配置
在进行学习配置文件之前,为了加深对框架的认识,简单的做了SSM框架的简单实验.然后画出listAll查询方法的整个过程的思维导图. 整个过程中的web.xml.SpringMVC.xml.applic ...
- luogu P2000 拯救世界
嘟嘟嘟 题目有点坑,要你求的多少大阵指的是召唤kkk的大阵数 * lzn的大阵数,不是相加. 看到这个限制条件,显然要用生成函数推一推. 比如第一个条件"金神石的块数必须是6的倍数" ...
- spring boot thymeleaf 标签未关闭报错
每天学习一点点 编程PDF电子书免费下载: http://www.shitanlife.com/code spring boot,input标签未关闭报bug,代码稍有不慎就出小问题,后来百度,goo ...