Here is a working version using streams for the encrypted data. The only code that has changed is the Encrypt and Decrypt methods.

xtea.pas
Code:
unit xtea;

interface

uses
  SysUtils, Classes;

type
  PKey128 = ^TKey128;
  TKey128 = array [0..3] of longword;

  PBlock64 = ^TBlock64;
  TBlock64 = array [0..1] of longword;

  TXTea = class(TObject)
  private
    FKey: TKey128;
    FInitialized: Boolean;
  public
    property Initialized: boolean read FInitialized default false;
    procedure Burn;
    procedure InitKey(const Key: string);
    procedure Encrypt(const Input: string; Stream: TStream);
    function Decrypt(Stream: TStream; Count: Integer): string;
    destructor Destroy; override;
    constructor Create;
  end;

implementation

const
  DELTA = $9e3779b9;
  XTEA_BLANK: TBlock64 = (0,0);
  XTEA_BURN: TKey128 =(0,0,0,0);

destructor TXTea.Destroy;
begin
  Burn;
  inherited;
end;

constructor TXTea.Create;
begin
  inherited;
  Burn;
end;

procedure TXTea.Burn;
begin
  FKey := XTEA_BURN;
  FInitialized := False;
end;

procedure TXTea.InitKey(const Key: string);
var L: integer;
begin
  if Length&#40;Key&#41; <= SizeOf&#40;FKey&#41; then
    L &#58;= Length&#40;Key&#41;
  else
    L &#58;= SizeOf&#40;FKey&#41;;

  Move&#40;Key&#91;1&#93;,FKey&#91;0&#93;,L&#41;;

  FInitialized &#58;= True;
end;

procedure TXTea.Encrypt&#40;const Input&#58; string; Stream&#58; TStream&#41;;
var i,l&#58; integer;
    v&#58; TBlock64;

  procedure CipherXTea&#40;v&#58; PBlock64; key&#58; PKey128&#41;;
  var sum&#58; longword;
      i&#58; integer;
  begin
    Sum&#58;= 0;

    for i&#58;= 0 to 31 do
    begin
     Inc&#40;v&#91;0&#93;, &#40;&#40;v&#91;1&#93; shl 4 xor v&#91;1&#93; shr 5&#41; + v&#91;1&#93;&#41; xor &#40;Sum + Key&#91;Sum and 3&#93;&#41;&#41;;
     Inc&#40;Sum, Delta&#41;;
     Inc&#40;v&#91;1&#93;, &#40;&#40;v&#91;0&#93; shl 4 xor v&#91;0&#93; shr 5&#41; + v&#91;0&#93;&#41; xor &#40;Sum + Key&#91;Sum shr 11 and 3&#93;&#41;&#41;;
    end;
  end;

begin
  if not Initialized then
    raise Exception.Create&#40;'Error&#58; You must define a password.'&#41;;

  l &#58;= &#40;Length&#40;Input&#41; + 1 + &#40;SizeOf&#40;v&#41; - 1&#41;&#41; and &#40;not &#40;SizeOf&#40;v&#41; - 1&#41;&#41;;

  i &#58;= 1;
  while i < l do
  try
    v &#58;= XTEA_BLANK;
    if l - &#40;i - 1&#41; < SizeOf&#40;v&#41; then
      Move&#40;Input&#91;i&#93;, v, l - &#40;i - 1&#41;&#41;
    else
      Move&#40;Input&#91;i&#93;, v, SizeOf&#40;v&#41;&#41;;
    CipherXTea&#40;@v, @FKey&#41;;
    Stream.Write&#40;v, SizeOf&#40;v&#41;&#41;;
    Inc&#40;i, SizeOf&#40;v&#41;&#41;;
  except
    raise;
  end;
end;

function TXTea.Decrypt&#40;Stream&#58; TStream; Count&#58; Integer&#41;&#58; string;
var i&#58; integer;
    v&#58; TBlock64;

  procedure DecipherXTea&#40;v&#58; PBlock64; Key&#58; PKey128&#41;;
  var
     i&#58; Integer;
     Sum&#58; Longword;
  begin
    Sum&#58;= $C6EF3720;

    for i&#58;= 0 to 31 do
    begin
      Dec&#40;v&#91;1&#93;, &#40;&#40;v&#91;0&#93; shl 4 xor v&#91;0&#93; shr 5&#41; + v&#91;0&#93;&#41; xor &#40;Sum + Key&#91;Sum shr 11 and 3&#93;&#41;&#41;;
      Dec&#40;Sum, Delta&#41;;
      Dec&#40;v&#91;0&#93;, &#40;&#40;v&#91;1&#93; shl 4 xor v&#91;1&#93; shr 5&#41; + v&#91;1&#93;&#41; xor &#40;Sum + Key&#91;Sum and 3&#93;&#41;&#41;;
    end;
  end;
begin
  if not Initialized then
    raise Exception.Create&#40;'Error&#58; You must define a password.'&#41;;

  SetLength&#40;Result, Count&#41;;

  i &#58;= 1;
  while i < Count do
  try
    v &#58;= XTEA_BLANK;
    Stream.Read&#40;v, SizeOf&#40;v&#41;&#41;;
    DecipherXTea&#40;@v, @FKey&#41;;
    Move&#40;v, Result&#91;i&#93;, SizeOf&#40;v&#41;&#41;;
    Inc&#40;i, SizeOf&#40;v&#41;&#41;;
  except
    raise;
  end;
end;

end.
Sample app
Code:
unit Unit4;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, xtea;

type
  TForm4 = class&#40;TForm&#41;
    Memo1&#58; TMemo;
    Memo2&#58; TMemo;
    Button1&#58; TButton;
    Button2&#58; TButton;
    procedure Button2Click&#40;Sender&#58; TObject&#41;;
    procedure FormDestroy&#40;Sender&#58; TObject&#41;;
    procedure Button1Click&#40;Sender&#58; TObject&#41;;
    procedure FormCreate&#40;Sender&#58; TObject&#41;;
  private
    FXTea&#58; TXTea;
    FStream&#58; TMemoryStream;
  public
    &#123; Public declarations &#125;
  end;

var
  Form4&#58; TForm4;

implementation

&#123;$R *.dfm&#125;

procedure TForm4.FormCreate&#40;Sender&#58; TObject&#41;;
begin
  FXTea &#58;= TXTea.Create;
  FXTea.InitKey&#40;'0123456789abcdef'&#41;;
  FStream &#58;= TMemoryStream.Create;
end;

procedure TForm4.FormDestroy&#40;Sender&#58; TObject&#41;;
begin
  FStream.Free;
  FXTea.Free;
end;

procedure TForm4.Button1Click&#40;Sender&#58; TObject&#41;;
var
  Input&#58; String;
begin
  Input &#58;= Memo1.Lines.Text;
  &#40;* Set the size and position of the stream outside the method so that
    we could append to an existing stream if we wanted to. *&#41;
  &#40;* Add one to allow for the NUL terminator on the string *&#41;
  FStream.SetSize&#40;Length&#40;Input&#41; + 1&#41;;
  FStream.Position &#58;= 0;
  FXTea.Encrypt&#40;Input, FStream&#41;;
end;

procedure TForm4.Button2Click&#40;Sender&#58; TObject&#41;;
begin
  &#40;* This sample assumes that the stream contains only the encrypted data,
    but it could be part of a much larger stream. *&#41;
  FStream.Position &#58;= 0;
  Memo2.Lines.Text &#58;= FXTea.Decrypt&#40;FStream, FStream.Size&#41;;
end;

end.
Press Button1 to encrypt the text in Memo1 into a TMemoryStream. Press Button2 to decrypt the stream into Memo2.