⚪
Cryptography
  • Inicio
  • Encoding / Codificación
    • Introducción
    • Binary
    • Hexadecimal (Base16)
    • ASCII
    • Unicode & UTF
    • Base64
    • URL encoding
  • Hashing
    • Introducción
    • Suma de verificación (checksum)
    • Passwords
    • Salt
  • Encriptación / Cifrado
    • Sustitución
    • Simétrico
    • Asimétrico
Con tecnología de GitBook
En esta página
  • Descripción
  • Linux/Unix
  • Windows

¿Te fue útil?

  1. Hashing

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

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

Verificación de integridad de archivos.

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).

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

Windows

# 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
AnteriorIntroducciónSiguientePasswords

Última actualización hace 2 años

¿Te fue útil?