mars.h

来自「This the mars encryption algorithm test 」· C头文件 代码 · 共 42 行

H
42
字号
/*********************************************************************/
/*-文件名:mars.h													 */
/*-																	 */
/*-功能: 实现mars加密算法dll   									 */
/*-																	 */
/*-说明:															 */
/*- The MARS algorithm is covered by a pending patent application	 */
/*-	owned by IBM,  who intend to offer a royalty free license under  */
/*-	any issued patent that results from such application if MARS is  */
/*-	selected as the AES algorithm.  In the interim, you may evaluate */
/*-	the MARS algorithm for your personal, lawful, non-profit purposes*/
/*-	as an end user.          										 */
/*-																	 */
/*-本程序的所有权利由作者保留							             */
/*-																     */
/*-																     */
/*-版本号:1.0.0(2002.6)	     									 */
/*-																	 */
/*-																	 */
/*-AUTHOR:吴真(WUZHEN)												 */
/*-																	 */
/*********************************************************************/


/*如果采用c++编译器的话采用如下宏定义
	#define DllExport extern "C" __declspec(dllexport)
*/
#define DllExport  __declspec(dllexport)


/*加密接口函数*/

DllExport int mars_enc( unsigned long * data ,
					   unsigned long datalen,/*以4字节为单位*/
					   unsigned long *outkey);
/*解密接口函数*/
DllExport int mars_dec( unsigned long * data ,unsigned long datalen, unsigned long *outkey);

DllExport int make_enckey(  unsigned long *key,/*用户输入的128~480位密钥*/
        					unsigned long keylen,/*以字节为单位*/
			    			 unsigned long *outkey/*存放用于加密的40套密钥*/
							);

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?