This commit is contained in:
zekroTJA committed 2026-07-15 22:20:36 +02:00
commit 0dc3a6c0f6
11 files changed
+243

No files matched your search

+39
View File
@@ -0,0 +1,39 @@
#![allow(unused)]
use std::collections::HashMap;
struct CredentialManager {
entries: HashMap<String, String>,
}
impl CredentialManager {
pub fn new() -> CredentialManager {
CredentialManager {
entries: HashMap::new(),
}
}
pub fn unlock(&self, master_secret: &str) {
todo!()
}
pub fn set(&mut self, key: &str, secret: &str) {
todo!()
}
pub fn get(&mut self, key: &str) -> Option<&str> {
todo!()
}
pub fn lock(&self) {
todo!()
}
}
fn main() {
let mut pw = CredentialManager::new();
pw.unlock("pssst");
pw.set("foo", "bar");
let val = pw.get("foo");
pw.lock();
}