pub struct Shield;Expand description
Security utility for Aether Shield.
Implementations§
Source§impl Shield
impl Shield
Sourcepub fn default_key() -> String
pub fn default_key() -> String
Get the default key for the current machine.
Sourcepub fn encrypt(prompt: &str, key_str: &str) -> String
pub fn encrypt(prompt: &str, key_str: &str) -> String
Encrypt a prompt using a key derived from environment or provided key.
Sourcepub fn decrypt(encrypted_prompt: &str, key_str: &str) -> Result<String, String>
pub fn decrypt(encrypted_prompt: &str, key_str: &str) -> Result<String, String>
Decrypt an encrypted prompt.
Sourcepub fn get_machine_id() -> String
pub fn get_machine_id() -> String
Get current machine ID for dynamic key generation. (Simplified implementation for portability)
Auto Trait Implementations§
impl Freeze for Shield
impl RefUnwindSafe for Shield
impl Send for Shield
impl Sync for Shield
impl Unpin for Shield
impl UnwindSafe for Shield
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
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