Here is one way - it protects against curious people using hexadecimal viewing, but, of course, will not work with best practices at runtime:
function GetA: string; begin Result := #$109#$121#$122; // 'myp' end; function Getb: string; begin Result := #97#$115#$115#$119; // 'assw' end; function GetC: string; begin Result := #$111#$114#$100; // 'ord' end; procedure TForm1.Whatever; begin ftp.Password := GetA + GetB + GetC + GetD; end;
As I said, it is not protected from the fact that someone sets up a break during the execution of the code using the debugger and checks ftp.password
in memory after installing it, but it is safe for hexadecimal viewing. Do I usually set ftp.password
time for DoyouthinkImthatstupid?
time DoyouthinkImthatstupid?
for those who want to try.
Ken white
source share