|
[求助]如何利用crc32判断文件是否被改动?
最初由 酷酷 发布 具体说明一下如何使用把CRC32值存放在别的文件中和把CRC32值放在不是校验的部份。 procedure GetCRC32File(FileName: string; var CRC32: DWORD); var F: file; BytesRead: DWORD; Buffer: array[1..65521] of Byte; i: Word; begin FileMode := 0; CRC32 := $FFFFFFFF; {$I-} AssignFile(F, FileName); Reset(F, 1); if IoResult = 0 then begin repeat BlockRead(F, Buffer, Sizeof(Buffer), BytesRead); for i := 1 to BytesRead do CRC32 := (CRC32 shr 8) xor Table[Buffer[i] xor (CRC32 and $000000FF)]; until BytesRead = 0; end; CloseFile(F); {$I+} CRC32 := not CRC32; end; function GetCrc32Str(s: string; Seed: LongInt): string; var Count: Integer; CrcVal: LongInt; begin CrcVal := Seed; for Count := 1 to Length(s) do CrcVal := Table[Byte(CrcVal xor DWORD(Ord(s[Count])))] xor ((CrcVal shr 8) and $00FFFFFF); Result := IntToHex(not (CrcVal), 8); end; |
|
|
|
(图) 中秋节礼物 PUNiSHER DEMO 1.5 脱壳机
happy 中秋 |
|
|
|
UPX Shell 3.2.1.2007 官方中文语言包
官方的汉化包真是垃圾,不知道是谁汉化的。 |
|
|
|
Armadillo v4.30 released
谢谢,林版主! |
|
Armadillo v4.30 released
版主为何不放一个? |
|
|
操作理由
RANk
{{ user_info.golds == '' ? 0 : user_info.golds }}
雪币
{{ experience }}
课程经验
{{ score }}
学习收益
{{study_duration_fmt}}
学习时长
基本信息
荣誉称号:
{{ honorary_title }}
能力排名:
No.{{ rank_num }}
等 级:
LV{{ rank_lv-100 }}
活跃值:
在线值:
浏览人数:{{ visits }}
最近活跃:{{ last_active_time }}
注册时间:{{ user_info.create_date_jsonfmt }}
勋章
兑换勋章
证书
证书查询 >
能力值