Hawkynt

SHA-256

SHA-256 (Secure Hash Algorithm 256-bit) is a cryptographic hash function from the SHA-2 family designed by NIST. Produces 256-bit (32-byte) hash values from arbitrary input data.

Properties

Property Value
Category Hash Functions
Sub-category SHA-2 Family
Security status πŸ›‘οΈ Secure
Complexity Intermediate
Inventor NIST
Year 2001
Origin πŸ‡ΊπŸ‡Έ United States
Source algorithms/hash/sha256.js

Parameters

Parameter Supported values
Output sizes 32 bytes (256 bits)

Security

Status: πŸ›‘οΈ Secure

No vulnerabilities are recorded for this implementation.

Documentation

References

Test vectors

3 vectors ship with this algorithm and run in the test suite. Byte values are hexadecimal.

Vector 1 β€” NIST Test Vector - Empty String

Field Value
input (empty)
expected e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855

Vector 2 β€” NIST Test Vector - β€˜abc’

Field Value
input 616263
expected ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad

Vector 3 β€” NIST Test Vector - Long String

Field Value
input 61626364626364656364656664656667 65666768666768696768696a68696a6b 696a6b6c6a6b6c6d6b6c6d6e6c6d6e6f 6d6e6f706e6f7071
expected 248d6a61d20638b8e5c026930c3e6039a33ce45964ff2167f6ecedd419db06c1

← All algorithms