S
szlbz
Unregistered / Unconfirmed
GUEST, unregistred user!
在delphi 2010下使用AES加密时,发现不能解码delphi 2010以前版本的加密的字符串,调试跟踪到HexToStr函数返回的结果与delphi 2007的不一样.导致解码失败。 请问如何处理? 测试用字符串: 'BC488864C871421A9F699DDEF350E5BFCDEB713046AA66719B2C9062431903562472914E6BF1A6685DC5D933C9E90C7BD3E08162778F25EB0E9DB62029410EE600A92439359FE7D248634075EABEC6AE1D0B34A35799AC1F432052745CBAAB6F4A4F5D997DF6177BF926069A86BA5535207A6047A13BC4ADB9D64FED973841A4' function HexToStr(Value:AnsiString): AnsiString; var I: Integer; begin Result := ''; for I := 1 to Length(Value) do begin if ((I mod 2) = 1) then begin Result:=Result+chr(StrToInt('0x' + Copy(Value, I, 2))); end; end; end;