Cryptini Update

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5693 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
gbamber
2017-01-23 16:41:19 +00:00
parent 7dd3f2a030
commit 1a04f8d1d9
2 changed files with 8 additions and 7 deletions

View File

@@ -932,14 +932,15 @@ begin
Result := s; Result := s;
if fPlainText = True then // Use unencrypted version if fPlainText = True then // Use unencrypted version
Exit; Exit;
if (s = Default) then Exit;
If (Length(s) < 32) then Exit; If (Length(s) < 32) then Exit;
fMD5String := LeftStr(s, 32); // Grab the MD5 string and store (unencoded) fMD5String := LeftStr(s, 32); // Grab the MD5 string and store (unencoded)
Result := RightStr(s, Length(s) - 32); // Use the rest s := RightStr(s, Length(s) - 32); // Use the rest
if Result <> EncodeString(Default) then // Deal with Default value
begin //if (s = EncodeString(Default)) then
Result := DecodeString(Result); // Un-Encrypt it // Result:=Default
end; //else
Result := DecodeString(s); // Un-Encrypt it
end; end;
(******************************************************************************) (******************************************************************************)

View File

@@ -3,7 +3,7 @@
* Can be dropped into any app using TIniFiles * Can be dropped into any app using TIniFiles
* Licence is Modified GPL with linking exception (same as Lazarus components) * Licence is Modified GPL with linking exception (same as Lazarus components)
* Tested: Windows 10 32/64-bit Linux Mint 14 32/64-bit * Tested: Windows 10 32/64-bit Linux Mint 14 32/64-bit
* Compiles with: Lazarus 1.6 -> FPC 3.x -> * Compiles with: Lazarus 1.6 -> FPC 2.6 ->
Read more about it: http://wiki.freepascal.org/CryptINI Read more about it: http://wiki.freepascal.org/CryptINI