summaryrefslogtreecommitdiff
path: root/UCoreUtils.pas
diff options
context:
space:
mode:
Diffstat (limited to 'UCoreUtils.pas')
-rw-r--r--UCoreUtils.pas12
1 files changed, 12 insertions, 0 deletions
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;