Chuyển tới nội dung chính
Z

What is Hash function?

A hash function maps input data of any size to a fixed-size string of bytes (the hash or digest). The same input always produces the same output, small input changes produce very different outputs, and the process is one-way — you cannot reverse a hash back to its input.

Good cryptographic hashes are deterministic, one-way, and collision-resistant (it is infeasible to find two inputs with the same hash). Examples include MD5 and SHA-1 (now broken for security) and SHA-256 (the modern standard).

Hashes are used for file-integrity checks, digital signatures, deduplication and — with a salt and a slow KDF like bcrypt or argon2 — password storage.

Hash function tools

Câu hỏi thường gặp

SHA-1 có còn an toàn không?

Không — SHA-1 đã có các cuộc tấn công đụng độ (collision) trên thực tế (SHAttered, 2017). Đừng dùng SHA-1 cho chữ ký số hay bất kỳ mục đích chống giả mạo nào. Hãy dùng SHA-256 thay thế.

Vì sao SHA-1 vẫn còn được sử dụng?

Vì tính tương thích ngược — Git dùng nó cho object ID (kèm bản vá phát hiện đụng độ), một số hệ thống TLS cũ, và checksum tệp từ trước đây.

Công cụ này có hoạt động offline không?

Có — việc băm diễn ra hoàn toàn trong trình duyệt của bạn sau khi trang đã tải xong.