Two SQLite files with the same data can have different bytes on disk, for example after a VACUUM, so sha256sum on the files is no use. The shell can hash the content instead.
sqlite3 app.db ".sha3sum"
sqlite3 restored.db ".sha3sum"
Each prints one SHA3 hash of all rows in all tables. When both lines match, the data is the same, no matter how the pages are laid out. I think it is a good way to check that a restored backup or a copy made with .backup really holds what the original had.
Some options are worth knowing. --schema also hashes the table definitions, so a missing index shows up too. Any other argument is a LIKE pattern for table names, so .sha3sum users hashes only that table, and .sha3sum 'log%' all tables that start with log. .help sha3sum lists the rest.
By default the schema is not part of the hash, so two files can match while one has an extra index or a different column type. Add --schema when that matters. The file has to be quiet while you hash it, because rows that change during the run give a hash that matches nothing. And it reads every row, so on a file of several gigabytes it takes a while.
Further reading: Command Line Shell For SQLite