- 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>
15 lines
544 B
Rust
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()
|
|
}
|