# Suma de verificación (checksum)

## Descripción

Las sumas de verificación (checksums) se utilizan para probar la integridad de los datos transmitidos. Si las sumas de verificación calculadas por parte del remitente son las mismas que las calculadas después de la transmisión de datos, significa que los datos transmitidos están intactos.

## Linux/Unix <a href="#validacion-de-integridad-de-archivo-linux-unix" id="validacion-de-integridad-de-archivo-linux-unix"></a>

```shell
# MD5
md5sum <file>
# SHA-1
sha1sum <file>
# SHA-256
sha256sum <file>
# SHA-512
sha512sum <file>
```

Verificación de integridad de archivos.

```shell
echo test1 > test1.txt
echo test2 > test2.txt
echo test3 > test3.txt
md5sum test1.txt test2.txt test3.txt > tests.txt
cat tests.txt
md5sum -c tests.txt
```

Búsqueda de archivo dado una suma de verificación (checksum).

```shell
find / -type f -exec md5sum {} + | tee /tmp/temp.txt | grep <md5-hash>
```

## Windows <a href="#validacion-de-integridad-de-archivo-windows" id="validacion-de-integridad-de-archivo-windows"></a>

```shell
# certutil
## MD5
certutil.exe -hashfile <file> MD5
## SHA-1
certutil.exe -hashfile <file>
## SHA-256
certutil.exe -hashfile <file> SHA256
## SHA-512
certutil.exe -hashfile <file> SHA512

# PowerShell
## MD5
Get-FileHash <file> -Algorithm MD5 | Format-List
## SHA-1
Get-FileHash <file> -Algorithm SHA1 | Format-List
## SHA-256
Get-FileHash <file> | Format-List
## SHA-512
Get-FileHash <file> -Algorithm SHA512 | Format-List
```


---

# Agent Instructions: 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:

```
GET https://cryptography.mrw0l05zyn.cl/hashing/suma-de-verificacion-checksum.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
