Design a small key–value store that supports user login and ensures values are encrypted at rest using a user-provided password.
You may assume this is a standalone service/library (language-agnostic) and you can use standard cryptographic primitives from a library (you do not need to implement AES/SHA yourself).
put(key, value)
stores the value such that if the database/file is leaked, values are not readable without the user’s password.
get(key)
returns the decrypted value for an authenticated user.
Register(username, password)
Login(username, password) -> session/token
Put(session, key, value)
Get(session, key) -> value
Delete(session, key)
/
ListKeys(session)
Login required