You can find this article here: http://bdn.borland.com/article/0,1410,28325,00.html

or view the code:

Code:
type
  TForm1 = class(TForm)
    Button1: TButton;
    Edit1: TEdit;
    Edit2: TEdit;
    Button2: TButton;
    Edit3: TEdit;
    procedure Button1Click(Sender: TObject);
    function EnDeCrypt(const Value : String) : String;
    procedure Button2Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

function TForm1.EnDeCrypt(const Value : String) : String;
var
  CharIndex : integer;
begin
  Result := Value;
  for CharIndex := 1 to Length(Value) do
    Result[CharIndex] := chr(not(ord(Value[CharIndex])));
end;

procedure TForm1.Button1Click(Sender: TObject);
begin
  Edit2.Text := EnDeCrypt(Edit1.Text);
end;

procedure TForm1.Button2Click(Sender: TObject);
begin
  Edit3.Text := EnDeCrypt(Edit2.Text);
end;