pub struct KeyStore { /* private fields */ }Expand description
Persiste claves de encriptación en SQLite.
Implementations§
Source§impl KeyStore
impl KeyStore
pub fn new(conn: Arc<Mutex<Connection>>) -> Self
Sourcepub fn add(&self, alias: &str, key: &RecipientKey) -> Result<RegisteredKey>
pub fn add(&self, alias: &str, key: &RecipientKey) -> Result<RegisteredKey>
Registra una nueva clave pública.
Sourcepub fn list(&self) -> Result<Vec<RegisteredKey>>
pub fn list(&self) -> Result<Vec<RegisteredKey>>
Lista todas las claves registradas.
Sourcepub fn get_default(&self) -> Result<Option<RegisteredKey>>
pub fn get_default(&self) -> Result<Option<RegisteredKey>>
Retorna la clave marcada como default.
Sourcepub fn set_default(&self, key_id: Uuid) -> Result<()>
pub fn set_default(&self, key_id: Uuid) -> Result<()>
Marca una clave como default (desmarca las demás).
Sourcepub fn load_all_recipients(&self) -> Result<Vec<RecipientKey>>
pub fn load_all_recipients(&self) -> Result<Vec<RecipientKey>>
Carga todos los recipients para el CryptoEngine.
Auto Trait Implementations§
impl Freeze for KeyStore
impl RefUnwindSafe for KeyStore
impl Send for KeyStore
impl Sync for KeyStore
impl Unpin for KeyStore
impl UnsafeUnpin for KeyStore
impl UnwindSafe for KeyStore
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more