调用方法(加密》解密》加密):
unsigned char key1[] = "12345678";
unsigned char key2[] = "abcdefgh";
unsigned char key3[] = "~!@#$%^&"; //如果只需要两组密钥,则本组密钥可以和密钥1一样。
unsigned char en_data[] = "龙的子孙";
unsigned char en_out_put[8];
//3DES 加密
des(en_data, key1, en_out_put, DES_ENCRYPT);
des(en_out_put, key2, en_data, DES_DECRYPT);
des(en_data, key3, en_out_put, DES_ENCRYPT);
标签:
3des
加密算法
上传时间:
2013-07-10
上传用户:Poppy