//
// Copyright (C) 2024 - 2025 Sven Dmitrienko <svens@svens-tools.de>
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 3, or (at your option)
// any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
//
////////////////////////////////////////////////////////////////////////////////

unit sdByteUtils;

interface

type
  TSDByteUtils = class
  public
    class function SameByteArray(aByteArray1: array of byte; aByteArray2: array of byte): Boolean;
  end;

implementation

uses
  SysUtils, UnitMainForm;

class function TSDByteUtils.SameByteArray(aByteArray1: array of byte; aByteArray2: array of byte): Boolean;
var
  i: Integer;
  a_Length: Integer;
begin
  Result := (Length(aByteArray1) = Length(aByteArray2));
  if (Result) then
  begin
    a_Length := Length(aByteArray1);
    for i := 0 to a_Length - 1 do
      if (aByteArray1[i] <> aByteArray2[i]) then
      begin
        Result := False;
        Break;
      end;
  end;
end;

end.
