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.

This struct can be used to read the result of an ECC operation. The methods which can be used 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>

Retrieve the scalar result of the operation.

§Errors

Returns an error if point verification failed, or if out is not the correct size.

Source

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

Retrieve the affine point result of the operation.

§Errors

Returns an error if point verification failed, or if 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>

Retrieve the Jacobian point result of the operation.

§Errors

Returns an error if point verification failed, or if x, y, or z are not the correct size.

Auto Trait Implementations§

§

impl<'op, O> Freeze for EccResultHandle<'op, O>

§

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> Unpin for EccResultHandle<'op, O>
where O: Unpin,

§

impl<'op, O> UnsafeUnpin for EccResultHandle<'op, O>

§

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

Blanket Implementations§

§

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

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

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

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

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

§

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

Mutably borrows from an owned value. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

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

§

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
§

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

§

type Error = Infallible

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

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

Performs the conversion.
§

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.
§

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

Performs the conversion.