#[protect]Expand description
Attribute macro that makes a struct protectable by a TEE.
Generates:
fn protect(ctx, fields...) -> Result<Protected<Self>>constructorZeroizeon Drop (ifzeroize = true, the default)- Derives
Serialize,Deserializeon the struct
§Example
ⓘ
#[hyde::protect]
struct DocumentKey {
key_material: [u8; 32],
}
// Generated API:
let protected = DocumentKey::protect(&mut ctx, key_material)?;
let doc_key: DocumentKey = protected.unprotect(&mut ctx)?;§Attributes
zeroize = false— disable Zeroize on Drop (default: true)