Skip to content

Commit 0ac44e6

Browse files
authored
block-padding: fix error message for ANSI X9.23 (#935)
1 parent 0fbf6bf commit 0ac44e6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

block-padding/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ impl RawPadding for AnsiX923 {
276276
fn raw_pad(block: &mut [u8], pos: usize) {
277277
// TODO: use bounds to check it at compile time
278278
if block.len() > 255 {
279-
panic!("block size is too big for PKCS#7");
279+
panic!("block size is too big for ANSI X9.23");
280280
}
281281
if pos >= block.len() {
282282
panic!("`pos` is bigger or equal to block size");
@@ -290,7 +290,7 @@ impl RawPadding for AnsiX923 {
290290
fn raw_unpad(block: &[u8]) -> Result<&[u8], UnpadError> {
291291
// TODO: use bounds to check it at compile time
292292
if block.len() > 255 {
293-
panic!("block size is too big for PKCS#7");
293+
panic!("block size is too big for ANSI X9.23");
294294
}
295295
let bs = block.len();
296296
let n = block[bs - 1] as usize;

0 commit comments

Comments
 (0)