test.c

来自「网管程序.应用于网管主机之间按照规则交换网管数据」· C语言 代码 · 共 43 行

C
43
字号
#include <string.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <stdio.h>
#include <signal.h>
#include <errno.h>
#include <time.h>
#include <sys/time.h>

char* GetTime(char* strTime);

int main(int argc, char *argv[])
{
	
	unsigned char str1[30];
	unsigned char str2[30];
	int nLen1;
	int nLen2;
	
	memset(str1, 0x00, sizeof(str1));
	
	if(ToBase64("how are you", str1, 11, &nLen1) == -1 )
	{
		printf("Error: To Base64 error\n");
		exit (-1);
	}
		
	printf("The Base64 is: %s \n", str1);
	
	
	//FromBase64
	if(FromBase64(str1, str2, nLen1, &nLen2) == -1 )
	{
		printf("Error: From Base64 error\n");
		exit (-1);
	}
	
	printf("The Base64 is: %s \n", str2);
	
	return 0;
}

⌨️ 快捷键说明

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