mirror of
https://github.com/emmansun/gmsm.git
synced 2025-04-26 20:26:19 +08:00
Add comments
This commit is contained in:
parent
8fd965965c
commit
90547cbb23
@ -23,6 +23,7 @@ func (pad ansiX923Padding) Pad(src []byte) []byte {
|
||||
return ret
|
||||
}
|
||||
|
||||
// Unpad decrypted plaintext, non-constant-time
|
||||
func (pad ansiX923Padding) Unpad(src []byte) ([]byte, error) {
|
||||
srcLen := len(src)
|
||||
if srcLen == 0 || srcLen%pad.BlockSize() != 0 {
|
||||
|
@ -22,6 +22,7 @@ func (pad pkcs7Padding) Pad(src []byte) []byte {
|
||||
return ret
|
||||
}
|
||||
|
||||
// Unpad decrypted plaintext, non-constant-time
|
||||
func (pad pkcs7Padding) Unpad(src []byte) ([]byte, error) {
|
||||
srcLen := len(src)
|
||||
if srcLen == 0 || srcLen%pad.BlockSize() != 0 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user