[][src]Struct sgx_tdh::SgxDhMsg3

pub struct SgxDhMsg3 {
    pub cmac: [u8; 16],
    pub msg3_body: SgxDhMsg3Body,
}

Type for MSG3 used in DH secure session establishment.

Fields

cmac: [u8; 16]msg3_body: SgxDhMsg3Body

Methods

impl SgxDhMsg3[src]

pub fn new() -> Self[src]

Create a SgxDhMsg3 with default values.

pub fn calc_raw_sealed_data_size(&self) -> u32[src]

Calculate the size of sgx_dh_msg3_t converted from SgxDhMsg3, really add the size of struct sgx_dh_msg3_t and msg3_body.additional_prop.

Return value

The size of sgx_dh_msg3_t needed.

pub unsafe fn to_raw_dh_msg3_t(
    &self,
    p: *mut sgx_dh_msg3_t,
    len: u32
) -> Option<*mut sgx_dh_msg3_t>
[src]

Convert SgxDhMsg3 to sgx_dh_msg3_t, this is an unsafe function.

Parameters

p

The pointer of a sgx_dh_msg3_t buffer to save the buffer of SgxDhMsg3.

len

The size of the sgx_dh_msg3_t buffer.

Return value

*Some(mut sgx_dh_msg3_t)

Indicates the conversion is successfully. The return value is the mutable pointer of sgx_dh_msg3_t.

None

The parameters p and len are not available for the conversion.

pub unsafe fn from_raw_dh_msg3_t(
    p: *mut sgx_dh_msg3_t,
    len: u32
) -> Option<Self>
[src]

Convert sgx_dh_msg3_t to SgxDhMsg3, this is an unsafe function.

Parameters

p

The pointer of a sgx_dh_msg3_t buffer.

len

The size of the sgx_dh_msg3_t buffer.

Return value

Some(SgxDhMsg3)

Indicates the conversion is successfully. The return value is SgxDhMsg3.

None

The parameters p and len are not available for the conversion.

Trait Implementations

impl Clone for SgxDhMsg3[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Default for SgxDhMsg3[src]

Auto Trait Implementations

impl Send for SgxDhMsg3

impl Sync for SgxDhMsg3

Blanket Implementations

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.