From 2de0a7945bf5941cf0a163b86fa8facbb5b05f2d Mon Sep 17 00:00:00 2001 From: Tomas Bzatek Date: Sun, 23 Nov 2008 16:59:50 +0100 Subject: Connection Manager UI improvements (format change!) - add Duplicate button - add popup menu on the list view - move selection when deleting - add sorting to the list view - save sorting state + column width - simple cipher saved passwords - use hash keys for each item when saving - allow duplicate entries --- UCoreUtils.pas | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'UCoreUtils.pas') diff --git a/UCoreUtils.pas b/UCoreUtils.pas index fb7056d..7a5a6b1 100644 --- a/UCoreUtils.pas +++ b/UCoreUtils.pas @@ -113,6 +113,8 @@ function EnsureUTF8String(s: PChar): PChar; overload; function Min(Val1, Val2: longint): longint; +function XORStr(const s: string; Key: byte): string; + procedure ReportGTKVersion; // Internal locking @@ -1578,6 +1580,16 @@ begin if Val1 < Val2 then Result := Val1 else Result := Val2; end; + +function XORStr(const s: string; Key: byte): string; +var i: integer; +begin + Result := s; + if Length(Result) > 0 then + for i := 1 to Length(Result) do + Result[i] := Char(Byte(Result[i]) xor Key); +end; + (********************************************************************************************************************************) procedure signal_proc(signal_number: integer); cdecl; -- cgit v1.2.3