Skip to main content

EccResultHandle

Struct EccResultHandle 

Source
pub struct EccResultHandle<'op, O>
where O: EccOperation,
{ /* private fields */ }
Expand description

The result of an ECC operation.

Used to read the result of an ECC operation. The available methods depend on the operation. An operation can compute multiple values, such as an affine point and a Jacobian point at the same time.

Implementations§

Source§

impl<'op, O> EccResultHandle<'op, O>
where O: EccOperation,

Source

pub fn success(&self) -> bool

Returns whether the operation was successful.

For operations that only perform point verification, this method returns whether the point is on the curve. For operations that do not perform point verification, this method always returns true.

Source

pub fn read_scalar_result(&self, out: &mut [u8]) -> Result<(), OperationError>

Retrieves the scalar result of the operation.

§Errors

OperationError when point verification failed, or when out is not the correct size.

Source

pub fn read_affine_point_result( &self, x: &mut [u8], y: &mut [u8], ) -> Result<(), OperationError>

Retrieves the affine point result of the operation.

§Errors

OperationError when point verification failed, or when x or y are not the correct size.

Source

pub fn read_jacobian_point_result( &self, x: &mut [u8], y: &mut [u8], z: &mut [u8], ) -> Result<(), OperationError>

Retrieves the Jacobian point result of the operation.

§Errors

OperationError when point verification failed, or when x, y, or z are not the correct size.

Auto Trait Implementations§

§

impl<'op, O> !RefUnwindSafe for EccResultHandle<'op, O>

§

impl<'op, O> !Send for EccResultHandle<'op, O>

§

impl<'op, O> !Sync for EccResultHandle<'op, O>

§

impl<'op, O> !UnwindSafe for EccResultHandle<'op, O>

§

impl<'op, O> Freeze for EccResultHandle<'op, O>
where PhantomData<(&'op mut (), O)>: Freeze,

§

impl<'op, O> Unpin for EccResultHandle<'op, O>
where PhantomData<(&'op mut (), O)>: Unpin,

§

impl<'op, O> UnsafeUnpin for EccResultHandle<'op, O>
where PhantomData<(&'op mut (), O)>: UnsafeUnpin,

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> Same for T

Source§

type Output = T

Should always be Self
Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

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

Source§

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.