diff options
author | Matthias Kramm <kramm@quiss.org> | 2010-10-07 18:11:39 -0700 |
---|---|---|
committer | Matthias Kramm <kramm@quiss.org> | 2010-10-07 18:11:39 -0700 |
commit | dede2d7970c4c716c406214d63ba240040b9249f (patch) | |
tree | ec790ef6aa0c3ca90e371fd221aeb33adc25bb74 /lib/as3 | |
parent | 17c31e6378739db073eccc4d04050ac86027bd82 (diff) |
removed duplicate md5version-0-9-1bv0.9.1
Diffstat (limited to 'lib/as3')
-rw-r--r-- | lib/as3/scripts.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/lib/as3/scripts.c b/lib/as3/scripts.c index 57b2da1a..5cd5db80 100644 --- a/lib/as3/scripts.c +++ b/lib/as3/scripts.c @@ -23,7 +23,6 @@ #include <time.h> #include "abc.h" -#include "../MD5.h" void swf_AddButtonLinks(SWF*swf, char stop_each_frame, char events) { @@ -31,27 +30,21 @@ void swf_AddButtonLinks(SWF*swf, char stop_each_frame, char events) int has_buttons = 0; TAG*tag=swf->firstTag; - void*md5 = initialize_md5(); - + unsigned int checksum = 0; while(tag) { if(tag->id == ST_SHOWFRAME) num_frames++; if(tag->id == ST_DEFINEBUTTON || tag->id == ST_DEFINEBUTTON2) has_buttons = 1; - update_md5(md5, tag->data, tag->len); + crc32_add_bytes(checksum, tag->data, tag->len); tag = tag->next; } int t = time(0); - update_md5(md5, (unsigned char*)&t, sizeof(t)); + crc32_add_bytes(checksum, &t, sizeof(t)); unsigned char h[16]; unsigned char file_signature[33]; - finish_md5(md5, h); - sprintf((char*)file_signature, "%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x", - h[0],h[1],h[2],h[3], - h[4],h[5],h[6],h[7], - h[8],h[9],h[10],h[11], - h[12],h[13],h[14],h[15]); + sprintf((char*)file_signature, "%x", checksum); char scenename1[80], scenename2[80]; sprintf(scenename1, "rfx.MainTimeline_%s", file_signature); |