diff options
| author | Steven Fackler <[email protected]> | 2016-11-14 19:44:20 +0100 |
|---|---|---|
| committer | Steven Fackler <[email protected]> | 2016-11-14 22:02:47 +0100 |
| commit | e929e092169dba0dfda26a957a38c61fa3e33eb2 (patch) | |
| tree | 56a62ec41268e3b3b8e560fc77da5acfd5ff431f /openssl/src | |
| parent | Fix non-static EcGroup method locations (diff) | |
| download | rust-openssl-e929e092169dba0dfda26a957a38c61fa3e33eb2.tar.xz rust-openssl-e929e092169dba0dfda26a957a38c61fa3e33eb2.zip | |
Add EcPoint::invert
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, |