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,
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,
Retrieves the scalar result of the operation.
§Errors
OperationError when point verification failed, or when 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,
Retrieves the affine point result of the operation.
§Errors
OperationError when point verification failed, or when 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,
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.