> For the complete documentation index, see [llms.txt](https://manual-en.seara.biz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://manual-en.seara.biz/appendix/check-file-hash-with-sha256.md).

# check file HASH with SHA256

Shows an example of how to verify a log file using the SHA256 hash function to confirm that the file is correct and has not been modified

Hashing with [SHA256](https://en.wikipedia.org/wiki/SHA-2) (Secure Hash Algorithm) is a method of converting an input of any size into a 256-bit output using the [SHA256](https://en.wikipedia.org/wiki/SHA-2) algorithm. It is used to verify that the input data has not been modified. Hashing is used to demonstrate data integrity: changing just a single character of the input will completely change the resulting HASH value. Administrators can easily verify data integrity by using the [SHA256 ](https://en.wikipedia.org/wiki/SHA-2)algorithm via various websites, or by installing a program that performs this function on their computer. Below is an example of a website that provides HASH generation with [SHA256](https://en.wikipedia.org/wiki/SHA-2):

{% embed url="<https://emn178.github.io/online-tools/sha256.html>" %}
<https://emn178.github.io/online-tools/sha256.html>
{% endembed %}

<figure><img src="https://2507662344-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDBkKbWLZfasd8l3v8ndZ%2Fuploads%2Fgit-blob-c3155743f36a8f95ad69b85589bcefb05faaf32f%2Fsha256%20hello%20world.png?alt=media" alt=""><figcaption><p>Example of generating a SHA256 hash</p></figcaption></figure>

For example, when the input is Hello World, the SHA256 output is 64ec88ca00b268e5ba1a35678a1b5316d212f4f366b2477232534a8aeca37f3c

<figure><img src="https://2507662344-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDBkKbWLZfasd8l3v8ndZ%2Fuploads%2Fgit-blob-4cff28943c282e23fdc8dcab235f38cd84b55661%2Fsha256%20hello%20warld.png?alt=media" alt=""><figcaption></figcaption></figure>

When the input is changed to Hello Warld (changing World to Warld), the output becomes afab019330eb8ab403ba8400e52eb9008fdf7652ce9397ddc4839b4d5be4c1ac, which is completely different even though only one character was changed.

To verify data integrity in SEARA, you can use the same method with a log file as the input <mark style="color:red;">(you can use the .gz file directly without extracting it)</mark>. Upload the file to the website and it will calculate the SHA256 HASH of that file. You can then compare the output with the value stored in the system's database to verify whether they match. For example:

<figure><img src="https://2507662344-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDBkKbWLZfasd8l3v8ndZ%2Fuploads%2Fgit-blob-478b4c85e625c0d95a41662c4874e8229d091302%2FScreenshot%202023-03-01%20at%2009.17.55.png?alt=media" alt=""><figcaption><p>Example of verifying a log file</p></figcaption></figure>

firewall.log-2023-02-26H23.gz is an Internet Traffic Log file for 26 February 2023 from 22:00-23:00. When checked ![](https://2507662344-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDBkKbWLZfasd8l3v8ndZ%2Fuploads%2Fgit-blob-11f98896889f47083fd67e1b1104c255c9b7aa2f%2FScreenshot%202023-03-01%20at%2009.21.28.png?alt=media) in the system, the value is 4d042baa1ad70c656546ef25ccd9827721cbfdbfa0e221e3e583af621219fea1

Verify the value by downloading the file and checking it on the website:

{% embed url="<https://www.strerr.com/en/sha256_file.html>" %}

The result is 4d042baa1ad70c656546ef25ccd9827721cbfdbfa0e221e3e583af621219fea1 as shown.

<figure><img src="https://2507662344-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDBkKbWLZfasd8l3v8ndZ%2Fuploads%2Fgit-blob-8c57393e9d3a4d4fe6f50be0ca9049c70c3776ae%2FScreenshot%202023-03-01%20at%2009.25.44.png?alt=media" alt=""><figcaption></figcaption></figure>

This matches the value ![](https://2507662344-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDBkKbWLZfasd8l3v8ndZ%2Fuploads%2Fgit-blob-11f98896889f47083fd67e1b1104c255c9b7aa2f%2FScreenshot%202023-03-01%20at%2009.21.28.png?alt=media) stored in the database, proving that the file contains correct data and has not been modified.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://manual-en.seara.biz/appendix/check-file-hash-with-sha256.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
