这两个函数是用来简单的解密某一个字符串的,现在想在后台ORACLE数据库中实现它,但是两边对应的函数类型不熟悉,遇到困难,求教高手指点,不胜感激啊...
//16进制字符串转换成字符串
function Tform1.HexStrToStr(const S:string):string;
var
  t:Integer;
  ts:string;
  M,Code:Integer;
begin
  t:=1;
  Result:='';
  while t<=Length(S) do
  begin
    while not (S[t] in ['0'..'9','A'..'F','a'..'f']) do
      inc(t);
    if (t+1>Length(S))or(not (S[t+1] in ['0'..'9','A'..'F','a'..'f'])) then
      ts:='$'+S[t]
    else
      ts:='$'+S[t]+S[t+1];
    Val(ts,M,Code);
    if Code=0 then
      Result:=Result+Chr(M);
    inc(t,2);
  end;
end;//异或字符串
function Tform1.XorStr(const S:string):string;
const
  aXorChar:array [0..2] of Byte =(3,9,15);
var
  I:Integer;
begin
  SetLength(Result,Length(S));
  for I:=1 to Length(S) do
  begin
    Result[I]:=Char(Ord(S[I]) Xor aXorChar[I mod (High(aXorChar)+1)]);
  end;
end;