Skip to content

Commit

Permalink
Fixed: AES/ECB/PCKS5padding panic
Browse files Browse the repository at this point in the history
  • Loading branch information
alonelucky authored Jan 30, 2024
1 parent de0364a commit 5497c86
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cipher.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ func (c *Cipher) AnsiX923UnPadding(src []byte) []byte {
// PKCS5Padding padding with PKCS5 mode.
// 进行 PKCS5 填充
func (c *Cipher) PKCS5Padding(src []byte) []byte {
return c.PKCS7Padding(src, 8)
return c.PKCS7Padding(src, 16)
}

// PKCS5UnPadding removes padding with PKCS5 mode.
Expand Down

0 comments on commit 5497c86

Please sign in to comment.