// Code generated by "stringer -linecomment -type=KeyUsage,ExtKeyUsage -output=x509_string.go"; DO NOT EDIT.

package x509

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[KeyUsageDigitalSignature-1]
	_ = x[KeyUsageContentCommitment-2]
	_ = x[KeyUsageKeyEncipherment-4]
	_ = x[KeyUsageDataEncipherment-8]
	_ = x[KeyUsageKeyAgreement-16]
	_ = x[KeyUsageCertSign-32]
	_ = x[KeyUsageCRLSign-64]
	_ = x[KeyUsageEncipherOnly-128]
	_ = x[KeyUsageDecipherOnly-256]
}

const (
	_KeyUsage_name_0 = "digitalSignaturecontentCommitment"
	_KeyUsage_name_1 = "keyEncipherment"
	_KeyUsage_name_2 = "dataEncipherment"
	_KeyUsage_name_3 = "keyAgreement"
	_KeyUsage_name_4 = "keyCertSign"
	_KeyUsage_name_5 = "cRLSign"
	_KeyUsage_name_6 = "encipherOnly"
	_KeyUsage_name_7 = "decipherOnly"
)

var (
	_KeyUsage_index_0 = [...]uint8{0, 16, 33}
)

func (i KeyUsage) String() string {
	switch {
	case 1 <= i && i <= 2:
		i -= 1
		return _KeyUsage_name_0[_KeyUsage_index_0[i]:_KeyUsage_index_0[i+1]]
	case i == 4:
		return _KeyUsage_name_1
	case i == 8:
		return _KeyUsage_name_2
	case i == 16:
		return _KeyUsage_name_3
	case i == 32:
		return _KeyUsage_name_4
	case i == 64:
		return _KeyUsage_name_5
	case i == 128:
		return _KeyUsage_name_6
	case i == 256:
		return _KeyUsage_name_7
	default:
		return "KeyUsage(" + strconv.FormatInt(int64(i), 10) + ")"
	}
}
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[ExtKeyUsageAny-0]
	_ = x[ExtKeyUsageServerAuth-1]
	_ = x[ExtKeyUsageClientAuth-2]
	_ = x[ExtKeyUsageCodeSigning-3]
	_ = x[ExtKeyUsageEmailProtection-4]
	_ = x[ExtKeyUsageIPSECEndSystem-5]
	_ = x[ExtKeyUsageIPSECTunnel-6]
	_ = x[ExtKeyUsageIPSECUser-7]
	_ = x[ExtKeyUsageTimeStamping-8]
	_ = x[ExtKeyUsageOCSPSigning-9]
	_ = x[ExtKeyUsageMicrosoftServerGatedCrypto-10]
	_ = x[ExtKeyUsageNetscapeServerGatedCrypto-11]
	_ = x[ExtKeyUsageMicrosoftCommercialCodeSigning-12]
	_ = x[ExtKeyUsageMicrosoftKernelCodeSigning-13]
}

const _ExtKeyUsage_name = "anyExtendedKeyUsageserverAuthclientAuthcodeSigningemailProtectionipsecEndSystemipsecTunnelipsecUsertimeStampingOCSPSigningmsSGCnsSGCmsCodeCommsKernelCode"

var _ExtKeyUsage_index = [...]uint8{0, 19, 29, 39, 50, 65, 79, 90, 99, 111, 122, 127, 132, 141, 153}

func (i ExtKeyUsage) String() string {
	idx := int(i) - 0
	if i < 0 || idx >= len(_ExtKeyUsage_index)-1 {
		return "ExtKeyUsage(" + strconv.FormatInt(int64(i), 10) + ")"
	}
	return _ExtKeyUsage_name[_ExtKeyUsage_index[idx]:_ExtKeyUsage_index[idx+1]]
}
