Exercise 07 submission
Name or course identifier: Date: Node version: App folder used:
Before repair
Before: login behavior
Correct password response: Wrong password response:
Before: storage A
Paste the actual JSON record:
Before: decoding
Paste the result:
Before: storage B
Register the same password again, inspect, and paste: Are A and B equal?
Repair
Attach your edited password-store.mjs, or paste the two complete functions here. Explain your choice of storage and verification helpers:
After repair
After: login behavior
Correct password response: Wrong password response: Correct password response after re-registration:
After: storage A
Paste the actual JSON record:
After: decoding
Paste the result and explain what null means:
After: storage B
Register the same password again, inspect, and paste: Are A and B equal?
Automated checks
Paste the complete node checks.mjs output:
Explain
- Why did a working login not prove safe storage?
- How do encoding, encryption, and password hashing differ?
- What does the salt do? Why is verifying different from creating a new hash?
- What does failed Base64 decoding prove, and what attacks remain possible?
- Name one additional protection needed for a real login system.
Troubleshooting
Record any problem you encountered and how you resolved it, or write “None.”