Expand description
Retrieve a per-application secret used to encrypt confidential data inside the sandbox.
§Examples
use std::{io::Read, os::fd::AsFd};
use ashpd::desktop::secret::Secret;
async fn run() -> ashpd::Result<()> {
let secret = Secret::new().await?;
let (mut x1, x2) = std::os::unix::net::UnixStream::pair()?;
secret.retrieve(&x2).await?;
drop(x2);
let mut buf = Vec::new();
x1.read_to_end(&mut buf)?;
Ok(())
}
Structs§
- The interface lets sandboxed applications retrieve a per-application secret.
Functions§
- A handy wrapper around
Secret::retrieve
.