sgx_keyreq/
lib.rs

1//! A library for simplifying the retrieval of keys in an SGX enclave. The library is both
2//! compatible with `no_std` environments as well as the stable rust compiler.
3//!
4//! ```
5//! # use rdrand::RdRand;
6//! # use rand::Rng;
7//! # fn main() -> Result<(), Box<dyn std::error::Error>> {
8//! let mut key: [u8; 32] = RdRand::new()?.gen();
9//! sgx_keyreq::get_key(Default::default(), &mut key)?;
10//! # Ok(())
11//! # }
12//! ```
13#![cfg_attr(not(feature = "std"), no_std)]
14
15#[cfg(test)]
16#[macro_use]
17extern crate alloc;
18
19pub use sgx_isa;
20
21pub mod ecalls;
22mod ffi;
23mod keyrequest;
24
25pub use keyrequest::{get_key, KeyOpts};