文章目录
一、文件加密解密操作
- 一、文件加密解密操作
- 1、加密整 4096 字节的数据
- 2、加密小于 4096 字节的数据
- 二、完整代码示例
- 1、文件加密操作
- 2、DES 加密解密头文件
- 3、第三方 DES 加密解密函数库源码
准备 2 2 2 个文件 , 一个是原始文件 , 一个是加密后的文件 , 将原始文件进行加密 , 然后将加密后的数据输出到加密文件中 ;
// 要加密的文件
const char *input_file= "D:/File/config_encode.ini";
// 加密后的文件
const char *output_file = "D:/File/config_decode.ini";
// 将 要加密的 input_file 文件加密 , 并输出到 output_file 文件中
ret = file_encoder(input_file, output_file);
1、加密整 4096 字节的数据
打开输入文件 , 每次从输入文件中 , 读取 4096 4096 4096 字节数据 , 将这 4096 4096 4096 字节数据加密 , 然后写出到加密文件中 ;
// 循环读取输入文件中的数据
while (!feof(fp_in))
{
// 尝试从输入文件中读取 4K 数据
input_len = fread(input_buffer, 1, 4096, fp_in);
// 如果读取完毕 , 直接退出
if (feof(fp_in))
{
break;
}
// 加密 4096 字节数据
ret = des_encode_raw(input_buffer, input_len, output_buffer, &output_len);
// 如果加密失败, 直接退出
if (ret != 0)
{
printf("error : des_encode_raw \n", ret);
goto END;
}
// 将加密后的数据 , 写出到输出文件中
output_tmplen = fwrite(output_buffer, 1, output_len, fp_out);
// 如果写出失败 , 直接退出
if (output_tmplen != output_len)
{
ret = -3;
printf("error : fwrite\n");
goto END;
}
}
2、加密小于 4096 字节的数据
如果读取的数据小于 4096 4096 4096 字节 , 会退出循环 , 执行下面的业务逻辑 ;
下面的函数主要是 加密小于 4096 字节数据 , 加密完成后 , 将加密数据输出到文件中 ;
// 加密小于 4096 字节数据
ret = des_encode(input_buffer, input_len, output_buffer, &output_len);
// 加密失败 , 直接退出
if (ret != 0)
{
printf("error : des_encode \n", ret);
goto END;
}
// 将加密后的数据 , 写出到输出文件中
output_tmplen = fwrite(output_buffer, 1, output_len, fp_out);
// 如果写出失败 , 直接退出
if (output_len != output_tmplen)
{
ret = -3;
printf("error : fwrite\n");
goto END;
}
二、完整代码示例
1、文件加密操作
#define _CRT_SECURE_NO_WARNINGS
#include
#include
#include
#include "des.h"
/**
* @brief file_encoder 文件加密
* @param input_file 被加密的文件
* @param output_file 加密后的文件
* @return
*/
int file_encoder(const char *input_file, const char *output_file)
{
// 用于接收各个步骤的返回值 , 做校验
int ret = 0;
// 输入 文件 指针
FILE *fp_in= NULL;
// 输出 文件 指针
FILE *fp_out = NULL;
// 输入缓冲区 , 大小 4K
unsigned char input_buffer[4096] = {0};
// 输入数据字节数
int input_len = 0;
// 输出文件缓冲区
unsigned char output_buffer[4096] = {0};
// 输出数据字节数
int output_len = 0;
// 输出数据写出字节数 , 用于与上面的 output_len 进行对比
// 一般情况下这两个值相等 , 如果出错 , 直接退出程序
int output_tmplen;
// 打开输入文件
fp_in = fopen(input_file, "rb");
if (fp_in == NULL)
{
goto END;
}
// 打开输出文件
fp_out = fopen(output_file, "wb");
if (fp_out == NULL)
{
goto END;
}
// 循环读取输入文件中的数据
while (!feof(fp_in))
{
// 尝试从输入文件中读取 4K 数据
input_len = fread(input_buffer, 1, 4096, fp_in);
// 如果读取完毕 , 直接退出
if (feof(fp_in))
{
break;
}
// 加密 4096 字节数据
ret = des_encode_raw(input_buffer, input_len, output_buffer, &output_len);
// 如果加密失败, 直接退出
if (ret != 0)
{
printf("error : des_encode_raw \n", ret);
goto END;
}
// 将加密后的数据 , 写出到输出文件中
output_tmplen = fwrite(output_buffer, 1, output_len, fp_out);
// 如果写出失败 , 直接退出
if (output_tmplen != output_len)
{
ret = -3;
printf("error : fwrite\n");
goto END;
}
}
// 加密小于 4096 字节数据
ret = des_encode(input_buffer, input_len, output_buffer, &output_len);
// 加密失败 , 直接退出
if (ret != 0)
{
printf("error : des_encode \n", ret);
goto END;
}
// 将加密后的数据 , 写出到输出文件中
output_tmplen = fwrite(output_buffer, 1, output_len, fp_out);
// 如果写出失败 , 直接退出
if (output_len != output_tmplen)
{
ret = -3;
printf("error : fwrite\n");
goto END;
}
END:
// 关闭输入文件
if (fp_in != NULL)
{
fclose(fp_in);
}
// 关闭输出文件
if (fp_out != NULL)
{
fclose(fp_out);
}
return 0;
}
int main_encode()
{
// 接收 子函数 返回值
int ret = 0;
// 要加密的文件
const char *input_file= "D:/File/config.ini";
// 加密后的文件
const char *output_file = "D:/File/config_encode.ini";
// 将 要加密的 input_file 文件加密 , 并输出到 output_file 文件中
ret = file_encoder(input_file, output_file);
// 加密失败
if (ret != 0)
{
printf("error : file_encoder\n " );
return ret;
}
system("pause");
return ret;
}
int main()
{
// 文件加密
main_encode();
system("pause");
return 0;
}
2、DES 加密解密头文件
/*********************************************************
* des.h
* DES 加密算法头文件
*********************************************************/
#ifndef _DES_H_
#define _DES_H_
#ifdef __cplusplus
extern "C" {
#endif
/**
* @brief des_encode_raw DES 加密操作 , 加密 4096 字节数据
* @param in_data 输入数据
* @param in_data_len 输入数据长度
* @param out_data 输出数据
* @param out_data_len 输出数据长度
* @return
*/
int des_encode_raw(
unsigned char *in_data,
int in_data_len,
unsigned char *out_data,
int *out_data_len);
/**
* @brief des_encode DES 加密操作 , 加密少于 4096 字节数据
* @param in_data 输入数据
* @param in_data_len 输入数据长度
* @param out_data 输出数据
* @param out_data_len 输出数据长度
* @return
*/
int des_encode(
unsigned char *in_data,
int in_data_len,
unsigned char *out_data,
int *out_data_len);
/**
* @brief des_decode_raw DES 解密操作 , 解密 4096 字节
* @param in_data 输入数据
* @param in_data_len 输入数据长度
* @param out_data 输出数据
* @param out_data_len 输出数据长度
* @return
*/
int des_decode_raw(
unsigned char *in_data,
int in_data_len,
unsigned char *out_data,
int *out_data_len);
/**
* @brief des_decode DES 解密操作 , 解密少于 4096 字节
* @param in_data 输入数据
* @param in_data_len 输入数据长度
* @param out_data 输出数据
* @param out_data_len 输出数据长度
* @return
*/
int des_decode(
unsigned char *in_data,
int in_data_len,
unsigned char *out_data,
int *out_data_len);
#ifdef __cplusplus
}
#endif
#endif
3、第三方 DES 加密解密函数库源码
/******************************************************
*
* des.c
* common des......
*
******************************************************/
#include
#include
#include
#include "des.h"
/*********************************************************
data type definition for Des;
**********************************************************/
#define EN0 0
#define DE1 1
#define DES_KEYBYTES 128
#define DES_KEYLONGS 32
#define DES_BLOCKLEN 8
typedef struct {
unsigned char ek[DES_KEYBYTES];
int ekLen;
unsigned char dk[DES_KEYBYTES];
int dkLen;
unsigned char CbcCtx[DES_BLOCKLEN];
} DES_CTX;
typedef struct {
unsigned char ek1[DES_KEYBYTES];
int ek1Len;
unsigned char dk1[DES_KEYBYTES];
int dk1Len;
unsigned char ek2[DES_KEYBYTES];
int ek2Len;
unsigned char dk2[DES_KEYBYTES];
int dk2Len;
unsigned char CbcCtx[DES_BLOCKLEN];
//int IsFirstBlock;
} DES3_CTX;
static unsigned char pc1[56] = {
56, 48, 40, 32, 24, 16, 8, 0, 57, 49, 41, 33, 25, 17,
9, 1, 58, 50, 42, 34, 26, 18, 10, 2, 59, 51, 43, 35,
62, 54, 46, 38, 30, 22, 14, 6, 61, 53, 45, 37, 29, 21,
13, 5, 60, 52, 44, 36, 28, 20, 12, 4, 27, 19, 11, 3 };
static unsigned char pc2[48] = {
13, 16, 10, 23, 0, 4, 2, 27, 14, 5, 20, 9,
22, 18, 11, 3, 25, 7, 15, 6, 26, 19, 12, 1,
40, 51, 30, 36, 46, 54, 29, 39, 50, 44, 32, 47,
43, 48, 38, 55, 33, 52, 45, 41, 49, 35, 28, 31 };
static unsigned short bytebit[8] = {0200,0100,040,020,010,04,02,01 };
static unsigned char totrot[16] = {1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28};
static unsigned long bigbyte[24] = {
0x800000L, 0x400000L, 0x200000L, 0x100000L,
0x80000L, 0x40000L, 0x20000L, 0x10000L,
0x8000L, 0x4000L, 0x2000L, 0x1000L,
0x800L, 0x400L, 0x200L, 0x100L,
0x80L, 0x40L, 0x20L, 0x10L,
0x8L, 0x4L, 0x2L, 0x1L };
//insert digits
static unsigned long SP1[64] ={
0x01010400l,0x00000000l,0x00010000l,0x01010404l,
0x01010004l,0x00010404l,0x00000004l,0x00010000l,
0x00000400l,0x01010400l,0x01010404l,0x00000400l,
0x01000404l,0x01010004l,0x01000000l,0x00000004l,
0x00000404l,0x01000400l,0x01000400l,0x00010400l,
0x00010400l,0x01010000l,0x01010000l,0x01000404l,
0x00010004l,0x01000004l,0x01000004l,0x00010004l,
0x00000000l,0x00000404l,0x00010404l,0x01000000l,
0x00010000l,0x01010404l,0x00000004l,0x01010000l,
0x01010400l,0x01000000l,0x01000000l,0x00000400l,
0x01010004l,0x00010000l,0x00010400l,0x01000004l,
0x00000400l,0x00000004l,0x01000404l,0x00010404l,
0x01010404l,0x00010004l,0x01010000l,0x01000404l,
0x01000004l,0x00000404l,0x00010404l,0x01010400l,
0x00000404l,0x01000400l,0x01000400l,0x00000000l,
0x00010004l,0x00010400l,0x00000000l,0x01010004l };
static unsigned long SP2[64]={
0x80108020l,0x80008000l,0x00008000l,0x00108020l,
0x00100000l,0x00000020l,0x80100020l,0x80008020l,
0x80000020l,0x80108020l,0x80108000l,0x80000000l,
0x80008000l,0x00100000l,0x00000020l,0x80100020l,
0x00108000l,0x00100020l,0x80008020l,0x00000000l,
0x80000000l,0x00008000l,0x00108020l,0x80100000l,
0x00100020l,0x80000020l,0x00000000l,0x00108000l,
0x00008020l,0x80108000l,0x80100000l,0x00008020l,
0x00000000l,0x00108020l,0x80100020l,0x00100000l,
0x80008020l,0x80100000l,0x80108000l,0x00008000l,
0x80100000l,0x80008000l,0x00000020l,0x80108020l,
0x00108020l,0x00000020l,0x00008000l,0x80000000l,
0x00008020l,0x80108000l,0x00100000l,0x80000020l,
0x00100020l,0x80008020l,0x80000020l,0x00100020l,
0x00108000l,0x00000000l,0x80008000l,0x00008020l,
0x80000000l,0x80100020l,0x80108020l,0x00108000l };
static unsigned long SP3[64]={
0x00000208l,0x08020200l,0x00000000l,0x08020008l,
0x08000200l,0x00000000l,0x00020208l,0x08000200l,
0x00020008l,0x08000008l,0x08000008l,0x00020000l,
0x08020208l,0x00020008l,0x08020000l,0x00000208l,
0x08000000l,0x00000008l,0x08020200l,0x00000200l,
0x00020200l,0x08020000l,0x08020008l,0x00020208l,
0x08000208l,0x00020200l,0x00020000l,0x08000208l,
0x00000008l,0x08020208l,0x00000200l,0x08000000l,
0x08020200l,0x08000000l,0x00020008l,0x00000208l,
0x00020000l,0x08020200l,0x08000200l,0x00000000l,
0x00000200l,0x00020008l,0x08020208l,0x08000200l,
0x08000008l,0x00000200l,0x00000000l,0x08020008l,
0x08000208l,0x00020000l,0x08000000l,0x08020208l,
0x00000008l,0x00020208l,0x00020200l,0x08000008l,
0x08020000l,0x08000208l,0x00000208l,0x08020000l,
0x00020208l,0x00000008l,0x08020008l,0x00020200l };
static unsigned long SP4[64]={
0x00802001l,0x00002081l,0x00002081l,0x00000080l,
0x00802080l,0x00800081l,0x00800001l,0x00002001l,
0x00000000l,0x00802000l,0x00802000l,0x00802081l,
0x00000081l,0x00000000l,0x00800080l,0x00800001l,
0x00000001l,0x00002000l,0x00800000l,0x00802001l,
0x00000080l,0x00800000l,0x00002001l,0x00002080l,
0x00800081l,0x00000001l,0x00002080l,0x00800080l,
0x00002000l,0x00802080l,0x00802081l,0x00000081l,
0x00800080l,0x00800001l,0x00802000l,0x00802081l,
0x00000081l,0x00000000l,0x00000000l,0x00802000l,
0x00002080l,0x00800080l,0x00800081l,0x00000001l,
0x00802001l,0x00002081l,0x00002081l,0x00000080l,
0x00802081l,0x00000081l,0x00000001l,0x00002000l,
0x00800001l,0x00002001l,0x00802080l,0x00800081l,
0x00002001l,0x00002080l,0x00800000l,0x00802001l,
0x00000080l,0x00800000l,0x00002000l,0x00802080l };
static unsigned long SP5[64]={
0x00000100l,0x02080100l,0x02080000l,0x42000100l,
0x00080000l,0x00000100l,0x40000000l,0x02080000l,
0x40080100l,0x00080000l,0x02000100l,0x40080100l,
0x42000100l,0x42080000l,0x00080100l,0x40000000l,
0x02000000l,0x40080000l,0x40080000l,0x00000000l,
0x40000100l,0x42080100l,0x42080100l,0x02000100l,
0x42080000l,0x40000100l,0x00000000l,0x42000000l,
0x02080100l,0x02000000l,0x42000000l,0x00080100l,
0x00080000l,0x42000100l,0x00000100l,0x02000000l,
0x40000000l,0x02080000l,0x42000100l,0x40080100l,
0x02000100l,0x40000000l,0x42080000l,0x02080100l,
0x40080100l,0x00000100l,0x20000000l,0x42080000l,
0x42080100l,0x00080100l,0x42000000l,0x42080100l,
0x02080000l,0x02000100l,0x40000100l,0x00080000l,
0x00080100l,0x02000100l,0x40000100l,0x00080000l,
0x00000000l,0x40080000l,0x02080100l,0x40000100l };
static unsigned long SP6[64]={
0x20000010l,0x20400000l,0x00004000l,0x20404010l,
0x20400000l,0x00000010l,0x20404010l,0x00400000l,
0x20004000l,0x00404010l,0x00400000l,0x20000010l,
0x00400010l,0x20004000l,0x20000000l,0x00004010l,
0x00000000l,0x00400010l,0x20004010l,0x00004000l,
0x00404000l,0x20004010l,0x00000010l,0x20400010l,
0x20400010l,0x00000000l,0x00404010l,0x20404000l,
0x00004010l,0x00404000l,0x20404000l,0x20000000l,
0x20004000l,0x00000010l,0x20400010l,0x00404000l,
0x20404010l,0x00400000l,0x00004010l,0x20000010l,
0x00400000l,0x20004000l,0x20000000l,0x00004010l,
0x20000010l,0x20404010l,0x00404000l,0x20400000l,
0x00404010l,0x20404000l,0x00000000l,0x20400010l,
0x00000010l,0x00004000l,0x20400000l,0x00404010l,
0x00004000l,0x00400010l,0x20004010l,0x00000000l,
0x20404000l,0x20000000l,0x00400010l,0x20004010l };
static unsigned long SP7[64] = {
0x00200000L, 0x04200002L, 0x04000802L, 0x00000000L,
0x00000800L, 0x04000802L, 0x00200802L, 0x04200800L,
0x04200802L, 0x00200000L, 0x00000000L, 0x04000002L,
0x00000002L, 0x04000000L, 0x04200002L, 0x00000802L,
0x04000800L, 0x00200802L, 0x00200002L, 0x04000800L,
0x04000002L, 0x04200000L, 0x04200800L, 0x00200002L,
0x04200000L, 0x00000800L, 0x00000802L, 0x04200802L,
0x00200800L, 0x00000002L, 0x04000000L, 0x00200800L,
0x04000000L, 0x00200800L, 0x00200000L, 0x04000802L,
0x04000802L, 0x04200002L, 0x04200002L, 0x00000002L,
0x00200002L, 0x04000000L, 0x04000800L, 0x00200000L,
0x04200800L, 0x00000802L, 0x00200802L, 0x04200800L,
0x00000802L, 0x04000002L, 0x04200802L, 0x04200000L,
0x00200800L, 0x00000000L, 0x00000002L, 0x04200802L,
0x00000000L, 0x00200802L, 0x04200000L, 0x00000800L,
0x04000002L, 0x04000800L, 0x00000800L, 0x00200002L };
static unsigned long SP8[64] = {
0x10001040L, 0x00001000L, 0x00040000L, 0x10041040L,
0x10000000L, 0x10001040L, 0x00000040L, 0x10000000L,
0x00040040L, 0x10040000L, 0x10041040L, 0x00041000L,
0x10041000L, 0x00041040L, 0x00001000L, 0x00000040L,
0x10040000L, 0x10000040L, 0x10001000L, 0x00001040L,
0x00041000L, 0x00040040L, 0x10040040L, 0x10041000L,
0x00001040L, 0x00000000L, 0x00000000L, 0x10040040L,
0x10000040L, 0x10001000L, 0x00041040L, 0x00040000L,
0x00041040L, 0x00040000L, 0x10041000L, 0x00001000L,
0x00000040L, 0x10040040L, 0x00001000L, 0x00041040L,
0x10001000L, 0x00000040L, 0x10000040L, 0x10040000L,
0x10040040L, 0x10000000L, 0x00040000L, 0x10001040L,
0x00000000L, 0x10041040L, 0x00040040L, 0x10000040L,
0x10040000L, 0x10001000L, 0x10001040L, 0x00000000L,
0x10041040L, 0x00041000L, 0x00041000L, 0x00001040L,
0x00001040L, 0x00040040L, 0x10000000L, 0x10041000L };
void deskey(unsigned char *key,short edf, unsigned long *kn);
void cookey(register unsigned long *raw1, unsigned long *dough);
//void cpkey(register unsigned long *into);
//void usekey(register unsigned long *from);
//void des(unsigned char *inblock,unsigned char *outblock);
void scrunch(register unsigned char *outof, register unsigned long *into);
void unscrun(register unsigned long *outof, register unsigned char *into);
void desfunc(register unsigned long *block,register unsigned long *keys);
/***************** DES Function *****************/
unsigned long OPENCOMM_DesExpandEncKey(
unsigned char *pbDesKey,
unsigned long ulDesKeyLen,
unsigned char *pbDesEncKey,
unsigned long *ulDesEncKeyLen);
unsigned long OPENCOMM_DesExpandDecKey(
unsigned char *pbDesKey,
unsigned long ulDesKeyLen,
unsigned char *pbDesDecKey,
unsigned long *ulDesDecKeyLen);
unsigned long OPENCOMM_DesEncRaw(
unsigned char *pbDesEncKey,
unsigned long ulDesEncKeyLen,
unsigned char *pbInData,
unsigned long ulInDataLen,
unsigned char *pbOutData,
unsigned long *ulOutDataLen);
unsigned long OPENCOMM_DesDecRaw(
unsigned char *pbDesDecKey,
unsigned long ulDesDecKeyLen,
unsigned char *pbInData,
unsigned long ulInDataLen,
unsigned char *pbOutData,
unsigned long *ulOutDataLen);
int myic_DESDecrypt(
unsigned char *pDesKey,
int nDesKeyLen,
unsigned char *pInData,
int nInDataLen,
unsigned char *pOutData,
int *pOutDataLen);
int myic_DESEncrypt(
unsigned char *pDesKey,
int nDesKeyLen,
unsigned char *pInData,
int nInDataLen,
unsigned char *pOutData,
int *pOutDataLen);
void deskey(unsigned char *key,short edf, unsigned long *kn)
{
register int i, j, l, m, n;
unsigned long pc1m[56],pcr[56];
for ( j = 0; j > 3] & (unsigned long)bytebit[m] ) ? 1:0);
}
for ( i = 0;i 8) & 0x3fL];
fval |= SP3[(work >> 16) & 0x3fL];
fval |= SP1[(work >> 24) & 0x3fL];
work = leftt ^ *keys++;
fval |= SP8[ work & 0x3fL];
fval |= SP6[(work >> 8) & 0x3fL];
fval |= SP4[(work >> 16) & 0x3fL];
fval |= SP2[(work >> 24) & 0x3fL];
right ^= fval;
}
right = (right 1);
work = (leftt ^ right) & 0xaaaaaaaaL;
leftt ^= work;
right ^= work;
leftt = (leftt 1);
work = ((leftt >> 8) ^ right) & 0x00ff00ffL;
right ^= work;
leftt ^= (work 2) ^ right) & 0x33333333L;
right ^= work;
leftt ^= (work 16) ^ leftt) & 0x0000ffffL;
leftt ^= work;
right ^= (work 4) ^ leftt) & 0x0f0f0f0fL;
leftt ^= work;
right ^= (work 8 bytes
memcpy(pbOutData, cp, DES_BLOCKLEN);
*ulOutDataLen = DES_BLOCKLEN;
return 0;
}
/*****************************************************************
OPENCOMM_DesDecRaw : Des算法解密小整块密文8字节
Return value:
0 : Success
other : failed
Parameters:
pbDesDecKey : DES解密密钥 input
ulDesDecKeyLen : DES解密密钥长度 input
pbInData : 待解密的密文 input
ulInDataLen : 待解密的密文长度 input
pbOutData : 解密后的明文 output
*ulOutDataLen : 解密后的明文长度 output
*****************************************************************/
unsigned long OPENCOMM_DesDecRaw(
unsigned char *pbDesDecKey,
unsigned long ulDesDecKeyLen,
unsigned char *pbInData,
unsigned long ulInDataLen,
unsigned char *pbOutData,
unsigned long *ulOutDataLen)
{
unsigned long work[2], dk[DES_KEYLONGS];
unsigned char cp[DES_BLOCKLEN];
if (ulInDataLen != DES_BLOCKLEN)
return 0xEE20;
if (ulDesDecKeyLen != DES_KEYBYTES)
return 0xEE20;
memcpy(cp, pbInData, DES_BLOCKLEN);
scrunch(cp,work); // 8 bytes -> 2 long
memcpy(dk, pbDesDecKey, ulDesDecKeyLen);
desfunc(work,dk);
unscrun(work,cp); // 2 long -> 8 bytes
memcpy(pbOutData, cp, DES_BLOCKLEN);
// des_enc(pbDesEncKey, pbInData, pbOutData);
*ulOutDataLen = DES_BLOCKLEN;
return 0;
}
/********************* DES *********************/
int myic_DESEncrypt(
unsigned char *pDesKey,
int nDesKeyLen,
unsigned char *pInData,
int nInDataLen,
unsigned char *pOutData,
int *pOutDataLen)
{
unsigned char DesKeyBuf[32];
unsigned char DesEncKeyBuf[128];
int EncKeyLen, KeyLen = 0;
int retval = 0, loops, i;
if(nInDataLen%8 != 0)
return 0xEE20;
if(nDesKeyLen != 8)
return 0xEE20;
KeyLen = nDesKeyLen;
memcpy(DesKeyBuf, pDesKey, nDesKeyLen);
retval = OPENCOMM_DesExpandEncKey(DesKeyBuf, KeyLen,
DesEncKeyBuf, (unsigned long *)&EncKeyLen);
if(retval != 0)
return retval;
loops = nInDataLen/8;
for(i = 0; i
关注
打赏
最近更新
- 深拷贝和浅拷贝的区别(重点)
- 【Vue】走进Vue框架世界
- 【云服务器】项目部署—搭建网站—vue电商后台管理系统
- 【React介绍】 一文带你深入React
- 【React】React组件实例的三大属性之state,props,refs(你学废了吗)
- 【脚手架VueCLI】从零开始,创建一个VUE项目
- 【React】深入理解React组件生命周期----图文详解(含代码)
- 【React】DOM的Diffing算法是什么?以及DOM中key的作用----经典面试题
- 【React】1_使用React脚手架创建项目步骤--------详解(含项目结构说明)
- 【React】2_如何使用react脚手架写一个简单的页面?