package sm4

import "xdx.jelly/xgcl/gerrors"

//go:generate stringer -type=ErrorCode -linecomment -output=errors_string.go errors.go
type ErrorCode gerrors.ErrorCode

func (e ErrorCode) Error() string {
	return gerrors.Format(uint32(e), e.String())
}

// error codes
const (
	ErrInvalidInput ErrorCode = 0x01004000 + iota //输入不合法
	ErrSM4EncFailed                               //SM4加密失败
	ErrSM4DecFailed                               //SM4解密失败
	ErrSM4MacFailed                               //SM4Mac计算失败
)
