From e45afaa1e9f248375e797a52eaf40eeb0ba8515a Mon Sep 17 00:00:00 2001 From: keepsimple1 Date: Sun, 1 Oct 2023 11:38:42 -0700 Subject: [PATCH] bump up version to 0.7.0 (#31) The minor version is bumped because we are introducing a new API to change auto_padding. This is not a breaking change though. --- CHANGELOG.md | 5 +++++ Cargo.toml | 2 +- src/lib.rs | 7 +++++-- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5ff255a..ff854e3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +# Version 0.7.0 +No breaking changes. Bumped the minor version because of a new API of padding. + +- support changing auto_padding setting in CBC mode (#30) + # Version 0.6.5 - Handles empty data gracefully in unpad() (#22) - Fix build warnings in recent Rust 1.69 (#23) diff --git a/Cargo.toml b/Cargo.toml index 9af5f64..3738020 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "libaes" -version = "0.6.5" +version = "0.7.0" authors = ["Han Xu "] edition = "2018" description = "AES cipher in safe Rust with no dependencies" diff --git a/src/lib.rs b/src/lib.rs index 60fb378..b1d64b2 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -163,8 +163,11 @@ impl Cipher { } } - /// Changes the `auto_padding` setting of the cipher. Used in CBC mode. - /// Note that `auto_padding` is ignored in CFB mode. + /// Changes the `auto_padding` setting of the cipher. The default value is `true`. + /// + /// When setting it to `false`, the input data of CBC encryption must be multiple of `AES_BLOCK_SIZE`. + /// + /// And note that `auto_padding` is ignored in CFB mode. pub fn set_auto_padding(&mut self, auto_padding: bool) { self.auto_padding = auto_padding; }