Skip to content
uencoder

SHA-256

SHA-256 is the 256-bit-output member of the SHA-2 family, widely used in TLS, blockchains, and cryptographic applications, with no known practical attacks.

Purpose

Provides a 256-bit secure hash meeting modern collision and preimage security requirements.

Mechanism

Processes input in 512-bit blocks, maintaining a 256-bit state (eight 32-bit words). Each block goes through 64 steps of nonlinear transforms (with message schedule and round constants) updating the state. Outputs a 256-bit digest.

Use cases

  • TLS 1.2/1.3 certificate signatures
  • Bitcoin proof of work
  • File integrity verification
  • HMAC-SHA256 message authentication

Examples

  • Input
    hello
    Output
    2cf24dba5fb0d30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824

    256 bits = 64 hex characters

Common errors

Hashing passwords directly with SHA-256 (no salt)
Use PBKDF2/bcrypt/Argon2

Related terms

Related tools

References