Skip to content

Commit 53f5b0d

Browse files
committed
EC_POINT_get_affine_coordinates
1 parent 1c07bef commit 53f5b0d

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

boring/src/ec.rs

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -411,6 +411,7 @@ impl EcPointRef {
411411

412412
/// Place affine coordinates of a curve over a prime field in the provided
413413
/// `x` and `y` `BigNum`s
414+
#[doc(alias = "affine_coordinates")]
414415
#[corresponds(EC_POINT_get_affine_coordinates_GFp)]
415416
pub fn affine_coordinates_gfp(
416417
&self,
@@ -429,6 +430,28 @@ impl EcPointRef {
429430
))
430431
}
431432
}
433+
434+
/// An alias for [`affine_coordinates_gfp`](Self::affine_coordinates_gfp).
435+
#[corresponds(EC_POINT_get_affine_coordinates)]
436+
#[doc(hidden)]
437+
pub fn affine_coordinates(
438+
&self,
439+
group: &EcGroupRef,
440+
x: &mut BigNumRef,
441+
y: &mut BigNumRef,
442+
ctx: &mut BigNumContextRef,
443+
) -> Result<(), ErrorStack> {
444+
unsafe {
445+
cvt(ffi::EC_POINT_get_affine_coordinates(
446+
group.as_ptr(),
447+
self.as_ptr(),
448+
x.as_ptr(),
449+
y.as_ptr(),
450+
ctx.as_ptr(),
451+
))
452+
}
453+
}
454+
432455
}
433456

434457
impl EcPoint {

0 commit comments

Comments
 (0)