diff options
-rw-r--r-- | openpgp/NEWS | 2 | ||||
-rw-r--r-- | openpgp/src/crypto/ecdh.rs | 12 |
2 files changed, 8 insertions, 6 deletions
diff --git a/openpgp/NEWS b/openpgp/NEWS index ba6d00b2..1a4ec42d 100644 --- a/openpgp/NEWS +++ b/openpgp/NEWS @@ -6,6 +6,8 @@ ** New functionality - Cert::insert_packets2 - Cert::insert_packets_merge + - crypto::ecdh::aes_key_wrap + - crypto::ecdh::aes_key_unwrap - Error::UnsupportedCert2 - TryFrom<Packet> for Unknown - types::{Curve, SymmetricAlgorithm, AEADAlgorithm, diff --git a/openpgp/src/crypto/ecdh.rs b/openpgp/src/crypto/ecdh.rs index a4c73985..2092ad07 100644 --- a/openpgp/src/crypto/ecdh.rs +++ b/openpgp/src/crypto/ecdh.rs @@ -229,9 +229,9 @@ fn pkcs5_unpad(sk: Protected, target_len: usize) -> Result<Protected> { /// See [RFC 3394]. /// /// [RFC 3394]: https://tools.ietf.org/html/rfc3394 -fn aes_key_wrap(algo: SymmetricAlgorithm, key: &Protected, - plaintext: &Protected) - -> Result<Vec<u8>> { +pub fn aes_key_wrap(algo: SymmetricAlgorithm, key: &Protected, + plaintext: &Protected) + -> Result<Vec<u8>> { if plaintext.len() % 8 != 0 { return Err(Error::InvalidArgument( "Plaintext must be a multiple of 8".into()).into()); @@ -299,9 +299,9 @@ fn aes_key_wrap(algo: SymmetricAlgorithm, key: &Protected, /// See [RFC 3394]. /// /// [RFC 3394]: https://tools.ietf.org/html/rfc3394 -fn aes_key_unwrap(algo: SymmetricAlgorithm, key: &Protected, - ciphertext: &[u8]) - -> Result<Protected> { +pub fn aes_key_unwrap(algo: SymmetricAlgorithm, key: &Protected, + ciphertext: &[u8]) + -> Result<Protected> { if ciphertext.len() % 8 != 0 { return Err(Error::InvalidArgument( "Ciphertext must be a multiple of 8".into()).into()); |