Files
Lumotia/crates/cloud-providers/src/keystore.rs
jake a83eafdc82 feat(kon): add cloud-providers crate — BYOK stubs, keystore
- Keystore stub using environment variables (keyring integration deferred)
- Minimal crate ready for cloud STT provider implementations post-Stage 1

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-16 21:01:07 +00:00

15 lines
544 B
Rust

/// Store an API key in the OS keychain.
/// Stub implementation using environment variables until keyring crate is added.
pub fn store_api_key(provider: &str, key: &str) {
std::env::set_var(
format!("KON_API_KEY_{}", provider.to_uppercase()),
key,
);
}
/// Retrieve an API key from the OS keychain.
/// Stub implementation using environment variables until keyring crate is added.
pub fn retrieve_api_key(provider: &str) -> Option<String> {
std::env::var(format!("KON_API_KEY_{}", provider.to_uppercase())).ok()
}