基于WORD文档的防篡改水印系统设计与实现(11)_毕业论文

毕业论文移动版

毕业论文 > 计算机论文 >

基于WORD文档的防篡改水印系统设计与实现(11)


            
         }
 

    Documents docs(app.GetDocuments());
    _Document appDoc;
     
    
      tcflag=wfilename.Replace("\\","\\\\");
    
    appDoc.AttachDispatch(docs.Open(
                      
                      COleVariant(JCwater.FileName,VT_BSTR),
                       
                      covFalse,     
                      covFalse,     
                      covFalse,     
                      covOptional,
                      covOptional,  
                      covFalse,     
                      covOptional,  
                      covOptional,
                       
                      covOptional,  
                      covTrue,      
                      covOptional,   
                      covOptional,
                      covOptional,
                      covOptional   
                      )  
                      );  
 
 
图3.4提取word文档
    
(2)生成应该被嵌入水印

 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++) (责任编辑:qin)