pub struct EncryptedContent { /* private fields */ }
Implementations§
Source§impl EncryptedContent
impl EncryptedContent
Sourcepub fn decrypt(&self, ciphers: &[SopsAES]) -> String
pub fn decrypt(&self, ciphers: &[SopsAES]) -> String
Examples found in repository?
examples/dada.rs (line 16)
6async fn main() {
7 let dada: SopsFile =
8 serde_json::from_str(DADA_AKV).expect("deserializing a SOPS encoded file failed");
9
10 let ciphers = dada.get_ciphers().await;
11
12 let bsd: HashMap<String, String> = dada
13 .content
14 .keys()
15 .into_iter()
16 .map(|key| (key.clone(), dada.get_content(key).decrypt(&ciphers)))
17 .collect();
18
19 println!("{:#?}", bsd);
20}
Auto Trait Implementations§
impl Freeze for EncryptedContent
impl RefUnwindSafe for EncryptedContent
impl Send for EncryptedContent
impl Sync for EncryptedContent
impl Unpin for EncryptedContent
impl UnwindSafe for EncryptedContent
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