diff --git a/src/token/cose/crypto_impl/rustcrypto/encrypt/chacha_poly.rs b/src/token/cose/crypto_impl/rustcrypto/encrypt/chacha_poly.rs index 57e13b9..9f2c5bd 100644 --- a/src/token/cose/crypto_impl/rustcrypto/encrypt/chacha_poly.rs +++ b/src/token/cose/crypto_impl/rustcrypto/encrypt/chacha_poly.rs @@ -7,6 +7,8 @@ use rand::CryptoRng; use rand::RngCore; impl RustCryptoContext { + /// Perform a ChaCha20/Poly1305 encryption operation on `plaintext` and the additional + /// authenticated data `aad` using the given `iv` and `key`. pub(super) fn encrypt_chacha20_poly1305( key: &CoseSymmetricKey<'_, ::Error>, plaintext: &[u8], @@ -16,6 +18,8 @@ impl RustCryptoContext { Self::encrypt_aead::(key, plaintext, aad, iv) } + /// Perform a ChaCha20/Poly1305 decryption operation on `ciphertext_with_tag` and the additional + /// authenticated data `aad` using the given `iv` and `key`. pub(super) fn decrypt_chacha20_poly1305( key: &CoseSymmetricKey<'_, ::Error>, ciphertext_with_tag: &[u8],