covOptional,
covOptional,
covOptional,
covTrue,
covOptional
covOptional
covOptional
)
);
图3.2 打开word文档
(5)获得UNICODE编码并进行md5加密。
MultiByteToWideChar(CP_ACP,0,wordtem,-1,wordstr,255); sel.MoveRight(COleVariant((short)1),COleVariant((short)1),COleVariant((short)0));
j=wordstr[0];
wordmd5=_ecvt(j,5,&decimal,&sign);
md5T.MD5Update ((unsigned char*)_ecvt(j,5,&decimal,&sign), wordmd5.GetLength());
md5T.MD5Final (digest);
high = digest[1] /16;
low = digest[1] %16;
for (k=0;k<16; k++)
{
j=k*2;
high = digest[k] /16;
low = digest[k] %16;
if (high >=10)
{
num[j]= (unsigned char)(high-10+'A');
}
else
{
num[j]= (unsigned char)(high+'0');
}
if (low >=10)
{
num[j+1]= (unsigned char)(low-10+'A');
}
else
{
num[j+1]= (unsigned char)(low+'0');
}
}
(6) 生成水印并嵌入文档。
switch (num[tempm])
{ case '0': wf[i].line=55;break;
case '1': wf[i].line=1;break;
case '2': wf[i].line=3;break;
case '3': wf[i].line=4;break;
case '4': wf[i].line=6;break;
case '5': wf[i].line=7;break;
case '6': wf[i].line=9;break;
case '7': wf[i].line=10;break;
case '8': wf[i].line=11;break;
case '9': wf[i].line=20;break;
case 'A': wf[i].line=23;break;
case 'B': wf[i].line=25;break;
case 'C': wf[i].line=26;break;
case 'D': wf[i].line=27;break;
case 'E': wf[i].line=39;break;
case 'F': wf[i].line=43;break;
}
if ((num[tempm+1]>'8') && (num[tempm+2]>'8') && (num[tempm+3]>'8'))
{wf[i].color=RGB(255,255,255);}
if ((num[tempm+1]>'8') && (num[tempm+2]>'8') && (num[tempm+3]<='8'))
{wf[i].color=RGB(255,255,254);}
if ((num[tempm+1]>'8') && (num[tempm+2]<='8') && (num[tempm+3]>'8'))
- 上一篇:基于webform的在线考试系统+用例图+文献综述
- 下一篇:Ford–Fulkerson算法铁路运输系统中车辆流问题的研究
-
-
-
-
-
-
-
中考体育项目与体育教学合理结合的研究
十二层带中心支撑钢结构...
酸性水汽提装置总汽提塔设计+CAD图纸
河岸冲刷和泥沙淤积的监测国内外研究现状
java+mysql车辆管理系统的设计+源代码
乳业同业并购式全产业链...
大众媒体对公共政策制定的影响
当代大学生慈善意识研究+文献综述
电站锅炉暖风器设计任务书
杂拟谷盗体内共生菌沃尔...