bcb最佳des加密方法

2021-04-18 02:17:35 字數 646 閱讀 4630

找了好多加密方法,覺得這種方式最為簡單。這個加密法採用des加密演算法,通過第三方控制項實現。

安裝方法:

1.將壓縮包解壓到bcb工作目錄下 

2.啟動c++builder,file->open project...開啟des.bpk

3.如果bcb不自動安裝在視窗結構列表中選擇des.bpk右擊選擇install

4.這時,在控制項欄裡的sample內應該就可以找到wcdescomp1這個控制項了   

使用方法:

在窗體內加入wcdescomp1

加密時呼叫encrystrhex();

解密時呼叫decrystrhex();

example: 

string x,y;  

x = wcdescomp1->encrystrhex("i love china","abcdefg"); 

y = wcdescomp1->decrystrhex(x,"abcdefg")  ; 

showmessage("encrypt /"i love china/" is " + x +"/ndecrypt is /"" + y + "/"");  

Des加密方法

預設金鑰向量 private static byte keys private static string encryptkey super des加密字串 待加密的字串 加密金鑰,要求為8位 加密成功返回加密後的字串,失敗返回源串 public static string encryptdes s...

MD5加密 DES加密,DES解密

public class pgsecret region des加密 des加密 要加密的字串。金鑰,且必須為8位。以base64格式返回的加密字串。endregion public static string desencrypt string sztoencrypt,string szkey s...

DES加密解密

using system using system.drawing using system.collections using system.componentmodel using system.windows.forms using system.data using system.io us...