Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
cypher.c
Package: tcpmp.rar [view]
Upload User: wstnjxml
Upload Date: 2014-04-03
Package Size: 7248k
Code Size: 1k
Category:
Windows CE
Development Platform:
C/C++
- #include <stdlib.h>
- #include <stdio.h>
- int main(int pn,const char** ps)
- {
- FILE *e,*f;
- int head[3];
- int pos,n,i;
- char buf[4096];
- if (pn<=1)
- {
- printf("usage: %s <input> <output>n",ps[0]);
- return 1;
- }
- srand((unsigned)time(NULL));
- f = fopen(ps[1],"rb");
- e = fopen(ps[2],"wb+");
- if (!f || !e)
- return 1;
- fseek(f,0,SEEK_END);
- head[0] = 0x44434241;
- head[1] = ftell(f);
- head[2] = pos = rand();
- fwrite(head,1,sizeof(head),e);
- fseek(f,0,SEEK_SET);
- while ((n=fread(buf,1,sizeof(buf),f))>0)
- {
- for (i=0;i<n;++i)
- buf[i] = buf[i] ^ pos++;
- fwrite(buf,1,n,e);
- }
- return 0;
- }