padding.go 270 B

123456789101112131415
  1. package padding
  2. import (
  3. "errors"
  4. )
  5. var (
  6. ErrPaddingSize = errors.New("pkcs5 padding size error")
  7. )
  8. // Padding is interface used for crypto.
  9. type Padding interface {
  10. Padding(src []byte, blockSize int) []byte
  11. Unpadding(src []byte, blockSize int) ([]byte, error)
  12. }