7 lines
294 B
Rust
7 lines
294 B
Rust
// TODO: Use error types (define error types in error.rs, see occlum-ratls as an example)
|
|
pub fn mrsigner_from_hex(mrsigner_hex: &str) -> Result<[u8; 32], Box<dyn std::error::Error>> {
|
|
let mut mrsigner = [0u8; 32];
|
|
hex::decode_to_slice(mrsigner_hex, &mut mrsigner)?;
|
|
Ok(mrsigner)
|
|
}
|