diff options
Diffstat (limited to 'openssl/src')
| -rw-r--r-- | openssl/src/ec_key.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/openssl/src/ec_key.rs b/openssl/src/ec_key.rs index 215a89b5..3b40496a 100644 --- a/openssl/src/ec_key.rs +++ b/openssl/src/ec_key.rs @@ -147,6 +147,13 @@ impl EcPointRef { } } + /// Inverts `self`. + pub fn invert(&mut self, group: &EcGroupRef, ctx: &BigNumContextRef) -> Result<(), ErrorStack> { + unsafe { + cvt(ffi::EC_POINT_invert(group.as_ptr(), self.as_ptr(), ctx.as_ptr())).map(|_| ()) + } + } + /// Serializes the point to a binary representation. pub fn to_bytes(&self, group: &EcGroupRef, |