Struct optee_utee::crypto_op::OperationInfoMultiple

source ·
pub struct OperationInfoMultiple { /* private fields */ }
Expand description

Represent the information about a crypto information which uses multiple keys.

Implementations§

source§

impl OperationInfoMultiple

source

pub fn from_raw(raw: *mut TEE_OperationInfoMultiple, size: usize) -> Self

Return the OperationInfoMultiple struct based on the raw struct TEE_OperationInfo.

The raw structure contains following fields:

  1. algorithm: One of the algorithm of AlgorithmId.
  2. mode: One of the mode of OperationMode.
  3. maxKeySize: The maximum key sizes of different algorithms as defined in TransientObjectType.
  4. operationClass: One of the constants from OperationConstant.
  5. digestLength: For a Mac, AE, or Digest, describes the number of bytes in the digest or tag.
  6. handleState: A bit vector describing the current state of the operation. Contains one or more of the HandleFlag.
  7. operationState: Every operation has two states which are defined as OperationStates.
  8. numberOfKeys: This is set to the number of keys required by this operation. May be 0 for an operation which requires no keys.
  9. keyInformation: This array contains numberOfKeys entries, each of which defines the details for one key used by the operation, in the order they are defined. If the buffer is larger than required to support numberOfKeys entries, the additional space is not initialized or modified. For each element: 9.1) keySize: If a key is programmed in the operation, the actual size of this key, otherwise 0. 9.2) requiredKeyUsage: A bit vector that describes the necessary bits in the object usage for set_key or set_key_2 to succeed without panicking.
source

pub fn raw(&self) -> *mut TEE_OperationInfoMultiple

Return the raw struct TEE_OperationInfoMultiple.

source

pub fn size(&self) -> usize

Return the size field of the raw structure TEE_OperationInfoMultiple.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.