From 1a04f8d1d9aa9a80589892611b1bc4a0ef6a4426 Mon Sep 17 00:00:00 2001 From: gbamber Date: Mon, 23 Jan 2017 16:41:19 +0000 Subject: [PATCH] Cryptini Update git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5693 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- components/cryptini/latest_stable/ucryptini.pas | 13 +++++++------ components/cryptini/readme.txt | 2 +- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/components/cryptini/latest_stable/ucryptini.pas b/components/cryptini/latest_stable/ucryptini.pas index 17af37483..832a88900 100644 --- a/components/cryptini/latest_stable/ucryptini.pas +++ b/components/cryptini/latest_stable/ucryptini.pas @@ -932,14 +932,15 @@ begin Result := s; if fPlainText = True then // Use unencrypted version Exit; + if (s = Default) then Exit; If (Length(s) < 32) then Exit; - fMD5String := LeftStr(s, 32); // Grab the MD5 string and store (unencoded) - Result := RightStr(s, Length(s) - 32); // Use the rest - if Result <> EncodeString(Default) then - begin - Result := DecodeString(Result); // Un-Encrypt it - end; + s := RightStr(s, Length(s) - 32); // Use the rest + // Deal with Default value + //if (s = EncodeString(Default)) then + // Result:=Default + //else + Result := DecodeString(s); // Un-Encrypt it end; (******************************************************************************) diff --git a/components/cryptini/readme.txt b/components/cryptini/readme.txt index 2d2e83c7d..4d66bdee1 100644 --- a/components/cryptini/readme.txt +++ b/components/cryptini/readme.txt @@ -3,7 +3,7 @@ * Can be dropped into any app using TIniFiles * Licence is Modified GPL with linking exception (same as Lazarus components) * 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