//3des24_encode_cbc ( ansi_string ( "01234567" ) , ansi_string ( "123" ) , ansi_string ( "liuyunqiang@lx100$#365#$" ) )
//----ansi_string convert utf16-little-endian format input data to ansi format
//---- input = 30 00 31 00 32 00 33 00 34 00 35 00 36 00 37 00
//---- output = 30 31 32 33 34 35 36 37
//
//----ansi_string convert utf16-little-endian format input data to ansi format
//---- input = 31 00 32 00 33 00
//---- output = 31 32 33
//
//----ansi_string convert utf16-little-endian format input data to ansi format
//---- input = 6C 00 69 00 75 00 79 00 75 00 6E 00 71 00 69 00 61 00 6E 00 67 00 40 00 6C 00 78 00 31 00 30 00 30 00 24 00 23 00 33 00 36 00 35 00 23 00 24 00
//---- output = 6C 69 75 79 75 6E 71 69 61 6E 67 40 6C 78 31 30 30 24 23 33 36 35 23 24
//
//--triple(24k) des cbc encrypt
//--key = 6C 69 75 79 75 6E 71 69 61 6E 67 40 6C 78 31 30 30 24 23 33 36 35 23 24
//--icv = 30 31 32 33 34 35 36 37 plain = 31 32 33 00 00 00 00 00
//--xor = 01 03 01 33 34 35 36 37 cipher = 5A 68 5A 2C 8D 73 23 70
//
//-----Final result --- 5A 68 5A 2C 8D 73 23 70
//
解决方案 »
- 对于winxp,是不是内存超过3.25G以上的部分,一点也没有用呀? 据说winxp只能支持到3.25G的内存,超过的部分对性能提升一点用也没有,请教是不是这样
- win32 改变鼠标指针
- CreateFileMapping参数4和参数5的问题
- 我想取掌上电脑的数据 通过串口编程能实现吗
- &&&&&&&&&&200分求程序源码---等待大侠&&&&&&&&&&
- 请网友帮忙找一些关于VC.Net的产生背景、发展方向以及功能特点等方面资料,写毕业论文用。谢谢了!
- 高分请教win2000下,访问并口的方法。(100分)
- 为什么执行EXEC SQL CONNECT 语句总是出错呢?
- 软件工程师请注意拉!
- 如何改变对话框中的字体
- wince mfc应用,UI操作界面切换时,影响socket通信速率
- ffmpeg如何获取摄像头名?
加密后base64:LxMdvv1fQnc=
key:liuyunqiang@lx100$#365#$
iv:01234567
加密后十六进制:
2f 13 1d be fd 5f 42 77
base64加密后结果:X7/YXdV5a3qbqE7d8T5RFA==
加密后十六进制:
5f bf d8 5d d5 79 6b 7a 9b a8 4e dd f1 3e 51 14非常感谢!
//3des24_decode_cbc ( ansi_string ( "01234567" ) , 5f bf d8 5d d5 79 6b 7a 9b a8 4e dd f1 3e 51 14 , ansi_string ( "liuyunqiang@lx100$#365#$" ) )
//----ansi_string convert utf16-little-endian format input data to ansi format
//---- input = 30 00 31 00 32 00 33 00 34 00 35 00 36 00 37 00
//---- output = 30 31 32 33 34 35 36 37
//
//----ansi_string convert utf16-little-endian format input data to ansi format
//---- input = 6C 00 69 00 75 00 79 00 75 00 6E 00 71 00 69 00 61 00 6E 00 67 00 40 00 6C 00 78 00 31 00 30 00 30 00 24 00 23 00 33 00 36 00 35 00 23 00 24 00
//---- output = 6C 69 75 79 75 6E 71 69 61 6E 67 40 6C 78 31 30 30 24 23 33 36 35 23 24
//
//--triple(24k) des cbc decrypt
//--key = 6C 69 75 79 75 6E 71 69 61 6E 67 40 6C 78 31 30 30 24 23 33 36 35 23 24
//--icv = 30 31 32 33 34 35 36 37 cipher = 5F BF D8 5D D5 79 6B 7A
//-- plain = 01 03 01 52 56 56 02 02 xor = 31 32 33 61 62 63 34 35
//--icv = 5F BF D8 5D D5 79 6B 7A cipher = 9B A8 4E DD F1 3E 51 14
//-- plain = 69 DA BE 3A D1 7D 6F 7E xor = 36 65 66 67 04 04 04 04
//
//-----Final result --- 31 32 33 61 62 63 34 35 36 65 66 67 04 04 04 04
//
//to_ansi_string ( 31 32 33 61 62 63 34 35 36 65 66 67 04 04 04 04 )
//--to_ansi_string convert ansi format input data to string
//-- input = 31 32 33 61 62 63 34 35 36 65 66 67 04 04 04 04
//-- output = "123abc456efg"
//
//-----Final result --- "123abc456efg"
//
这是你的字符串,解密之后的结果,可以看出,后面补了4个04,所以如果加密123的话,后面可能补5个05
//3des24_encode_cbc ( ansi_string ( "01234567" ) , ansi_string ( "123" ) 0505050505 , ansi_string ( "liuyunqiang@lx100$#365#$" ) )
//----ansi_string convert utf16-little-endian format input data to ansi format
//---- input = 30 00 31 00 32 00 33 00 34 00 35 00 36 00 37 00
//---- output = 30 31 32 33 34 35 36 37
//
//----ansi_string convert utf16-little-endian format input data to ansi format
//---- input = 31 00 32 00 33 00
//---- output = 31 32 33
//
//----ansi_string convert utf16-little-endian format input data to ansi format
//---- input = 6C 00 69 00 75 00 79 00 75 00 6E 00 71 00 69 00 61 00 6E 00 67 00 40 00 6C 00 78 00 31 00 30 00 30 00 24 00 23 00 33 00 36 00 35 00 23 00 24 00
//---- output = 6C 69 75 79 75 6E 71 69 61 6E 67 40 6C 78 31 30 30 24 23 33 36 35 23 24
//
//--triple(24k) des cbc encrypt
//--key = 6C 69 75 79 75 6E 71 69 61 6E 67 40 6C 78 31 30 30 24 23 33 36 35 23 24
//--icv = 30 31 32 33 34 35 36 37 plain = 31 32 33 05 05 05 05 05
//--xor = 01 03 01 36 31 30 33 32 cipher = 2F 13 1D BE FD 5F 42 77
//
//-----Final result --- 2F 13 1D BE FD 5F 42 77
//加密格式已经蒙对了。
//base64_encode ( 2F 13 1D BE FD 5F 42 77 )
//--base64 encode make data to string
//-- input = 2F 13 1D BE FD 5F 42 77
//-- output = 4C 00 78 00 4D 00 64 00 76 00 76 00 31 00 66 00 51 00 6E 00 63 00 3D 00
//
//-----Final result --- LxMdvv1fQnc=
//base64也蒙对了,就对16进制数进行操作就行了,你只要注意加密数据的格式就行了。