diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2022-01-06 18:49:03 +0100 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2022-01-06 18:49:31 +0100 |
commit | 1ac7921b4aeb1278871ae64a1d37b456b2c48c5a (patch) | |
tree | 76740e7b96619470ea65198e9ff6b73aad4d5c5b /openpgp/src/crypto/mpi.rs | |
parent | 8210f923647472794745016db2b59e34c8751e8c (diff) |
openpgp: Improve documentation.
Diffstat (limited to 'openpgp/src/crypto/mpi.rs')
-rw-r--r-- | openpgp/src/crypto/mpi.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/openpgp/src/crypto/mpi.rs b/openpgp/src/crypto/mpi.rs index 4ecde45b..f58f0670 100644 --- a/openpgp/src/crypto/mpi.rs +++ b/openpgp/src/crypto/mpi.rs @@ -157,7 +157,8 @@ impl MPI { /// /// Returns `Error::UnsupportedEllipticCurve` if the curve is not /// supported, `Error::MalformedMPI` if the point is formatted - /// incorrectly. + /// incorrectly, `Error::InvalidOperation` if the given curve is + /// operating on native octet strings. pub fn decode_point(&self, curve: &Curve) -> Result<(&[u8], &[u8])> { Self::decode_point_common(self.value(), curve) } @@ -431,7 +432,8 @@ impl ProtectedMPI { /// /// Returns `Error::UnsupportedEllipticCurve` if the curve is not /// supported, `Error::MalformedMPI` if the point is formatted - /// incorrectly. + /// incorrectly, `Error::InvalidOperation` if the given curve is + /// operating on native octet strings. pub fn decode_point(&self, curve: &Curve) -> Result<(&[u8], &[u8])> { MPI::decode_point_common(self.value(), curve) } |