Skip to content · ⁨ข้ามไปยังเนื้อหา⁩

Hashing and digital signatures · ⁨การแฮชและการลายเซ็นดิจิทัล⁩

English

Hashing protects integrity

  • We hashed passwords for secrecy. Hashing also protects integrity — proving data was not changed.
  • Change even one character of the input, and the hash changes completely.
ไทย

การแฮชปกป้องความสมบูรณ์

  • เราแฮชรหัสผ่านเพื่อ ความลับ การแฮชยังปกป้อง ความสมบูรณ์ — ยืนยันว่าข้อมูลไม่ถูกแก้ไข
  • เปลี่ยนตัวอักษรเดียวของอินพุต และค่าแฮชจะเปลี่ยนไปทั้งหมด
import hashlib
print(hashlib.sha256(b"hello").hexdigest()[:16])
print(hashlib.sha256(b"hellp").hexdigest()[:16])   # totally different

Log in or create account · ⁨เข้าสู่ระบบหรือสร้างบัญชี⁩

IGCSE, A-Level & AP