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,
impl<'op, O> EccResultHandle<'op, O>where
O: EccOperation,
Sourcepub fn success(&self) -> bool
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.
Sourcepub fn read_scalar_result(&self, out: &mut [u8]) -> Result<(), OperationError>where
O: OperationReturnsScalar,
pub fn read_scalar_result(&self, out: &mut [u8]) -> Result<(), OperationError>where
O: OperationReturnsScalar,
Retrieve the scalar result of the operation.
§Errors
Returns an error if point verification failed, or if out is not the correct size.
Sourcepub fn read_affine_point_result(
&self,
x: &mut [u8],
y: &mut [u8],
) -> Result<(), OperationError>where
O: OperationReturnsAffinePoint,
pub fn read_affine_point_result(
&self,
x: &mut [u8],
y: &mut [u8],
) -> Result<(), OperationError>where
O: OperationReturnsAffinePoint,
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.
Sourcepub fn read_jacobian_point_result(
&self,
x: &mut [u8],
y: &mut [u8],
z: &mut [u8],
) -> Result<(), OperationError>where
O: OperationReturnsJacobianPoint,
pub fn read_jacobian_point_result(
&self,
x: &mut [u8],
y: &mut [u8],
z: &mut [u8],
) -> Result<(), OperationError>where
O: OperationReturnsJacobianPoint,
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.