Author Topic: send email, smtp pwd ini file encoding  (Read 57 times)

frs.steve

  • Newbie
  • *
  • Posts: 1
send email, smtp pwd ini file encoding
« on: August 21, 2025, 03:45:44 pm »
hi
what is the encoding used for the smtp pwd stored in the ini file?
i need to reverse decode it

Jan

  • Hero Member
  • *****
  • Posts: 1226
Re: send email, smtp pwd ini file encoding
« Reply #1 on: August 21, 2025, 06:05:56 pm »
Code: [Select]
function PwdDecode(heslo: string): string;
var i,j,m,l: integer;
    w: string;
begin
w:='';
for i:=1 to (length(heslo) div 2) do
  begin
  m:=Ord(heslo[i*2-1]);
  l:=Ord(heslo[i*2]);
  j:=(m-(i mod 3)-ord('c'))*16+(l-(i mod 3)-ord('f'));
  w:=w+Chr(j);
  end;
result:=w;
end;