求VB6.0 DES加密解密源码

2001JinCheng 2006-11-15 10:45:57
谢谢您,我的Mail:2001jincheng@21cn.com
...全文
416 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
2001JinCheng 2006-11-16
  • 打赏
  • 举报
回复
请再帮一下忙
Dim mDes As New clsDES
Dim inByte() As Byte
Dim outByte() As Byte
Dim outS As String

inByte = StrConv("中国推出Excel服务器软件!", vbFromUnicode)

Call mDes.DES_Encode(inByte, MstrKey, outByte)

Call mDes.DES_Decode(outByte, MstrKey, inByte)

outS = StrConv(inByte, vbUnicode)

以上代码执行后outS =中国推出Excel服务器软件!,执行正确。但是为什么执行以下代码就不正确了呢?outS =中国推出Excel服蜶T.M滩醅∪ 緽滾,成乱码了呢?请指教。

Dim mDes As New clsDES
Dim inByte() As Byte
Dim outByte() As Byte
Dim outS As String

inByte = StrConv("中国推出Excel服务器软件!", vbFromUnicode)

Call mDes.DES_Encode(inByte, MstrKey, outByte)

outS = StrConv(outByte, vbUnicode)
outByte = StrConv(outS, vbFromUnicode)

Call mDes.DES_Decode(outByte, MstrKey, inByte)

outS = StrConv(inByte, vbUnicode)
2001JinCheng 2006-11-16
  • 打赏
  • 举报
回复
请大家多多关照,我在线等待。
2001JinCheng 2006-11-16
  • 打赏
  • 举报
回复
请再帮一下忙
Dim mDes As New clsDES
Dim inByte() As Byte
Dim outByte() As Byte
Dim outS As String

inByte = StrConv("中国推出Excel服务器软件!", vbFromUnicode)

Call mDes.DES_Encode(inByte, MstrKey, outByte)

Call mDes.DES_Decode(outByte, MstrKey, inByte)

outS = StrConv(DeOutByte, vbUnicode)

以上代码执行后outS =中国推出Excel服务器软件!,执行正确。但是为什么执行以下代码就不正确了呢?outS =中国推出Excel服蜶T.M滩醅∪ 緽滾,成乱码了呢?请指教。

Dim mDes As New clsDES
Dim inByte() As Byte
Dim outByte() As Byte
Dim outS As String

inByte = StrConv("中国推出Excel服务器软件!", vbFromUnicode)

Call mDes.DES_Encode(inByte, MstrKey, outByte)

outS = StrConv(outByte, vbUnicode)
outByte = StrConv(outS, vbFromUnicode)

Call mDes.DES_Decode(outByte, MstrKey, inByte)

outS = StrConv(DeOutByte, vbUnicode)


xiagl311 2006-11-15
  • 打赏
  • 举报
回复
xuexi
myvip 2006-11-15
  • 打赏
  • 举报
回复
http://dev.csdn.net/article/20/20659.shtm
你自己看下吧!

7,762

社区成员

发帖
与我相关
我的任务
社区描述
VB 基础类
社区管理员
  • VB基础类社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧