package sm9m 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 ( ErrRandomFaile ErrorCode = 0x01011000 + iota //生成随机数失败 ErrInvalidInput //输入不合法 ErrKeyTooBig //密钥太大(>=N) ErrKeyIsZero //密钥为0 ErrInvalidCipherC1 //密文不合法(C1不是合法的曲线上的点) )