← Quiz: How HTTPS Works: all 10 questions
Quiz: How HTTPS Works · Question 9 of 10
What does this print? (code)
What does this print?
import hashlib
h1 = hashlib.sha256(b"marks: 78").hexdigest()
h2 = hashlib.sha256(b"marks: 87").hexdigest()
print(len(h1), h1 == h2)
- A.32 False
- B.64 False
- C.64 True
- D.256 False
Answer & explanation
Correct answer: 64 False
SHA-256 gives 256 bits = 64 hex characters, and different inputs give different hashes.
Can you get the rest right without peeking?
Take the timed Quiz: How HTTPS Works quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →