Lasiaf 0 Report post Posted July 9, 2004 er.... bleh mintak tlg x?? kalo aku buat satu string.. pastu nak encryptkannya..cth:char[34] a=blablablavoid encrypt(a);paham tak??... aku cuma tak dapat lagi cara² nak encrypt sesuatu char ribuan terima kasih untuk yang membantu.... Quote Share this post Link to post Share on other sites
encik pot pet 0 Report post Posted July 9, 2004 http://www.schneier.com/blowfish.htmlawak pakai blowfish algo..okkalau nak design algo sendiri pun boleh...afaik, orang2 yang design algo crypto ni mostly taraf phd...kalau awak rasa boleh challenge dia orang.. silakan Quote Share this post Link to post Share on other sites
deejagothic 1 Report post Posted July 9, 2004 #include <stdio.h> #define PROG_NAME "xe" void usage() { printf("-------------------------------n"); printf("Invalid command line.n"); printf("Usage:nt%s infile outfile keyn", PROG_NAME); printf("-------------------------------n"); } int main(int argc, char *argv[]) { int count,bytes; /* counter when looping through file, and bytes to count filesize */ FILE *in,*out; /* In and out FILE Streams to read/write data */ if(argc < 4) { /* Error check the command line */ usage(); /* Display Usage Information on error */ return 0; /* Exit Program returning 0 - no error */ } if (( in = fopen(argv[1], "rb")) == NULL) /* Error Check File Streams */ { printf("Error opening %s.n", argv[1]); } if (( out = fopen(argv[2], "wb")) == NULL) { printf("Error opening %s.n", argv[2]); } while(( count = getc(in)) != EOF) { count = count ^ *argv[3]; /* Apply XOR ( KEY ) */ bytes++; /* Increment counter of filesize */ putc(count, out); /* Write new file */ } fclose(in); fclose(out); printf("Encryption Success:n"); printf("tEncrypted %s and stored data in %s.n", argv[1],argv[2]); printf("tWrote %d bytes to %s.n", bytes,argv[2]); return 0; } cilok! Quote Share this post Link to post Share on other sites
akuBest 0 Report post Posted July 12, 2004 A'kum. deeja, cam penah tgk jer koding tuh. kalo tak silap aku ada satu tutorial yg kat internet tu kan? aku penah wat, tapi tak menjadik, tapik dah lama la... aku sajer nak menerai... Quote Share this post Link to post Share on other sites
Lasiaf 0 Report post Posted July 12, 2004 Tima kasih suma..... aku akan berusaha... dapat aku bagitau.... ade presentation skang ni.... siut tul la sesat plak.... singgah jap kat lab ni... baru sekali ponteng..he he he he²³²² Quote Share this post Link to post Share on other sites
Lasiaf 0 Report post Posted July 12, 2004 ok deejagothic... tima kasih atas kod tu.. aku dah try kat lab ni... guna Borland C++ v 5.01 tak salah aku la.. jadi... buat satu fail ntxe.cpp .. copy source dan compile... 3 warning message..guna dos@cmd taip kat folder yang ade menatang ni... ntxe nama_fail_yg_ko_nak_encryptkan nama_fail_baru 1-2551-255 untuk xor...kalo nak decryptkan... function sama....10101<your text01010<no encrypt<------------- l11111<encrypt l-----kena sama nombor.... v l11111<encrypt text l01010<no encrypt <----l-------10101<decrypt Quote Share this post Link to post Share on other sites
Lasiaf 0 Report post Posted July 12, 2004 (edited) ------- Edited August 10, 2004 by Lasiaf Quote Share this post Link to post Share on other sites
raihan 0 Report post Posted August 22, 2004 amik contoh encryption kat source muka depan login webpage yahoo mail Quote Share this post Link to post Share on other sites
Power 0 Report post Posted August 23, 2004 Tima kasih suma..... aku akan berusaha... dapat aku bagitau.... ade presentation skang ni.... siut tul la sesat plak.... singgah jap kat lab ni... baru sekali ponteng..he he he he²³²² hmmm.. kecoh laaa.. pi mengajo ker? Quote Share this post Link to post Share on other sites
didi7eleven 0 Report post Posted August 24, 2004 cik Power pun ngajo gak ke Quote Share this post Link to post Share on other sites