33 lines
1.1 KiB
Go
33 lines
1.1 KiB
Go
// Code generated by "stringer -type=ErrorCode -linecomment -output=errors_string.go errors.go"; DO NOT EDIT.
|
|
|
|
package sm2
|
|
|
|
import "strconv"
|
|
|
|
func _() {
|
|
// An "invalid array index" compiler error signifies that the constant values have changed.
|
|
// Re-run the stringer command to generate them again.
|
|
var x [1]struct{}
|
|
_ = x[ErrInvalidInput-16785408]
|
|
_ = x[ErrInvalidCurve-16785409]
|
|
_ = x[ErrInvalidPoint-16785410]
|
|
_ = x[ErrDecodeASN1Failed-16785411]
|
|
_ = x[ErrInvalidPublicKey-16785412]
|
|
_ = x[ErrEncFailed-16785413]
|
|
_ = x[ErrDecFailed-16785414]
|
|
_ = x[ErrKeyExchangeFailed-16785415]
|
|
_ = x[ErrRandomError-16785416]
|
|
}
|
|
|
|
const _ErrorCode_name = "输入不合法不是SM2曲线不是SM2曲线上的点ASN.1解码失败SM2公钥不合法SM2加密失败SM2解密失败SM2密钥交换失败输入随机数不合适,重新产生随机数"
|
|
|
|
var _ErrorCode_index = [...]uint8{0, 15, 30, 54, 71, 89, 104, 119, 140, 188}
|
|
|
|
func (i ErrorCode) String() string {
|
|
i -= 16785408
|
|
if i >= ErrorCode(len(_ErrorCode_index)-1) {
|
|
return "ErrorCode(" + strconv.FormatInt(int64(i+16785408), 10) + ")"
|
|
}
|
|
return _ErrorCode_name[_ErrorCode_index[i]:_ErrorCode_index[i+1]]
|
|
}
|