ttlv

package
v0.0.0-...-bc37760 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 28, 2019 License: MIT Imports: 19 Imported by: 0

Documentation

Overview

Code generated by kmipgen; DO NOT EDIT.

Index

Constants

This section is empty.

Variables

View Source
var ErrHeaderTruncated = errors.New("header truncated")
View Source
var ErrIntOverflow = fmt.Errorf("value exceeds max int value %d", math.MaxInt32)
View Source
var ErrInvalidHexString = errors.New("invalid hex string")
View Source
var ErrInvalidLen = errors.New("invalid length")
View Source
var ErrInvalidTag = errors.New("invalid tag")
View Source
var ErrInvalidType = errors.New("invalid KMIP type")
View Source
var ErrLongIntOverflow = fmt.Errorf("value exceeds max long int value %d", math.MaxInt64)
View Source
var ErrNoTag = errors.New("unable to determine tag for field")
View Source
var ErrTagConflict = errors.New("tag conflict")
View Source
var ErrUnexpectedValue = errors.New("no field was found to unmarshal value into")
View Source
var ErrUnsupportedEnumTypeError = errors.New("unsupported type for enums, must be string, or int types")
View Source
var ErrUnsupportedTypeError = errors.New("marshaling/unmarshaling is not supported for this type")
View Source
var ErrValueTruncated = errors.New("value truncated")

Functions

func Details

func Details(err error) string

func EnumToString

func EnumToString(tag Tag, i uint32) string

func EnumToTyped

func EnumToTyped(tag Tag, i uint32) interface{}

func Is

func Is(err error, originals ...error) bool

func IsBitMask

func IsBitMask(tag Tag) bool

func IsEnumeration

func IsEnumeration(tag Tag) bool

func Marshal

func Marshal(v interface{}) ([]byte, error)

func NormalizeName

func NormalizeName(s string) string

implementation of 5.4.1.1 and 5.5.1.1

func ParseEnum

func ParseEnum(tag Tag, s string) (uint32, error)

func ParseInteger

func ParseInteger(tag Tag, s string) (int32, error)

func Print

func Print(w io.Writer, indent string, t TTLV) (err error)

func RegisterAlternativeNameType

func RegisterAlternativeNameType(a AlternativeNameType, name string)

func RegisterAttestationType

func RegisterAttestationType(a AttestationType, name string)

func RegisterBatchErrorContinuationOption

func RegisterBatchErrorContinuationOption(b BatchErrorContinuationOption, name string)

func RegisterBitMask

func RegisterBitMask(tag Tag, def EnumTypeDef)

func RegisterBlockCipherMode

func RegisterBlockCipherMode(b BlockCipherMode, name string)

func RegisterCancellationResult

func RegisterCancellationResult(c CancellationResult, name string)

func RegisterCertificateRequestType

func RegisterCertificateRequestType(c CertificateRequestType, name string)

func RegisterCertificateType

func RegisterCertificateType(c CertificateType, name string)

func RegisterClientRegistrationMethod

func RegisterClientRegistrationMethod(c ClientRegistrationMethod, name string)

func RegisterCredentialType

func RegisterCredentialType(c CredentialType, name string)

func RegisterCryptographicAlgorithm

func RegisterCryptographicAlgorithm(c CryptographicAlgorithm, name string)

func RegisterCryptographicUsageMask

func RegisterCryptographicUsageMask(c CryptographicUsageMask, name string)

func RegisterDRBGAlgorithm

func RegisterDRBGAlgorithm(d DRBGAlgorithm, name string)

func RegisterDerivationMethod

func RegisterDerivationMethod(d DerivationMethod, name string)

func RegisterDestroyAction

func RegisterDestroyAction(d DestroyAction, name string)

func RegisterDigitalSignatureAlgorithm

func RegisterDigitalSignatureAlgorithm(d DigitalSignatureAlgorithm, name string)

func RegisterEncodingOption

func RegisterEncodingOption(e EncodingOption, name string)

func RegisterEnum

func RegisterEnum(tag Tag, def EnumTypeDef)

func RegisterFIPS186Variation

func RegisterFIPS186Variation(f FIPS186Variation, name string)

func RegisterHashingAlgorithm

func RegisterHashingAlgorithm(h HashingAlgorithm, name string)

func RegisterKeyCompressionType

func RegisterKeyCompressionType(k KeyCompressionType, name string)

func RegisterKeyFormatType

func RegisterKeyFormatType(k KeyFormatType, name string)

func RegisterKeyRoleType

func RegisterKeyRoleType(k KeyRoleType, name string)

func RegisterKeyValueLocationType

func RegisterKeyValueLocationType(k KeyValueLocationType, name string)

func RegisterKeyWrapType

func RegisterKeyWrapType(k KeyWrapType, name string)

func RegisterLinkType

func RegisterLinkType(l LinkType, name string)

func RegisterMaskGenerator

func RegisterMaskGenerator(m MaskGenerator, name string)

func RegisterNameType

func RegisterNameType(n NameType, name string)

func RegisterObjectGroupMember

func RegisterObjectGroupMember(o ObjectGroupMember, name string)

func RegisterObjectType

func RegisterObjectType(o ObjectType, name string)

func RegisterOpaqueDataType

func RegisterOpaqueDataType(o OpaqueDataType, name string)

func RegisterOperation

func RegisterOperation(o Operation, name string)

func RegisterPaddingMethod

func RegisterPaddingMethod(p PaddingMethod, name string)

func RegisterProfileName

func RegisterProfileName(p ProfileName, name string)

func RegisterPutFunction

func RegisterPutFunction(p PutFunction, name string)

func RegisterQueryFunction

func RegisterQueryFunction(q QueryFunction, name string)

func RegisterRNGAlgorithm

func RegisterRNGAlgorithm(r RNGAlgorithm, name string)

func RegisterRNGMode

func RegisterRNGMode(r RNGMode, name string)

func RegisterRecommendedCurve

func RegisterRecommendedCurve(r RecommendedCurve, name string)

func RegisterResultReason

func RegisterResultReason(r ResultReason, name string)

func RegisterResultStatus

func RegisterResultStatus(r ResultStatus, name string)

func RegisterRevocationReasonCode

func RegisterRevocationReasonCode(r RevocationReasonCode, name string)

func RegisterSecretDataType

func RegisterSecretDataType(s SecretDataType, name string)

func RegisterShreddingAlgorithm

func RegisterShreddingAlgorithm(s ShreddingAlgorithm, name string)

func RegisterSplitKeyMethod

func RegisterSplitKeyMethod(s SplitKeyMethod, name string)

func RegisterState

func RegisterState(s State, name string)

func RegisterStorageStatusMask

func RegisterStorageStatusMask(s StorageStatusMask, name string)

func RegisterTag

func RegisterTag(tag Tag, name string)

func RegisterType

func RegisterType(typ Type, name string)

func RegisterUnwrapMode

func RegisterUnwrapMode(u UnwrapMode, name string)

func RegisterUsageLimitsUnit

func RegisterUsageLimitsUnit(u UsageLimitsUnit, name string)

func RegisterValidationAuthorityType

func RegisterValidationAuthorityType(v ValidationAuthorityType, name string)

func RegisterValidationType

func RegisterValidationType(v ValidationType, name string)

func RegisterValidityIndicator

func RegisterValidityIndicator(v ValidityIndicator, name string)

func RegisterWrappingMethod

func RegisterWrappingMethod(w WrappingMethod, name string)

func Unmarshal

func Unmarshal(b []byte, v interface{}) error

Types

type AlternativeNameType

type AlternativeNameType uint32

9.1.3.2.34 Table 322

const (
	AlternativeNameTypeUninterpretedTextString AlternativeNameType = 0x00000001
	AlternativeNameTypeURI                     AlternativeNameType = 0x00000002
	AlternativeNameTypeObjectSerialNumber      AlternativeNameType = 0x00000003
	AlternativeNameTypeEmailAddress            AlternativeNameType = 0x00000004
	AlternativeNameTypeDNSName                 AlternativeNameType = 0x00000005
	AlternativeNameTypeX_500DistinguishedName  AlternativeNameType = 0x00000006
	AlternativeNameTypeIPAddress               AlternativeNameType = 0x00000007
)

func (AlternativeNameType) MarshalTTLV

func (a AlternativeNameType) MarshalTTLV(enc *Encoder, tag Tag) error

func (AlternativeNameType) MarshalText

func (a AlternativeNameType) MarshalText() (text []byte, err error)

func (AlternativeNameType) String

func (a AlternativeNameType) String() string

type AttestationType

type AttestationType uint32

9.1.3.2.36 Table 324

const (
	AttestationTypeTPMQuote           AttestationType = 0x00000001
	AttestationTypeTCGIntegrityReport AttestationType = 0x00000002
	AttestationTypeSAMLAssertion      AttestationType = 0x00000003
)

func (AttestationType) MarshalTTLV

func (a AttestationType) MarshalTTLV(enc *Encoder, tag Tag) error

func (AttestationType) MarshalText

func (a AttestationType) MarshalText() (text []byte, err error)

func (AttestationType) String

func (a AttestationType) String() string

type BatchErrorContinuationOption

type BatchErrorContinuationOption uint32

9.1.3.2.30 Table 318

const (
	BatchErrorContinuationOptionContinue BatchErrorContinuationOption = 0x00000001
	BatchErrorContinuationOptionStop     BatchErrorContinuationOption = 0x00000002
	BatchErrorContinuationOptionUndo     BatchErrorContinuationOption = 0x00000003
)

func (BatchErrorContinuationOption) MarshalTTLV

func (b BatchErrorContinuationOption) MarshalTTLV(enc *Encoder, tag Tag) error

func (BatchErrorContinuationOption) MarshalText

func (b BatchErrorContinuationOption) MarshalText() (text []byte, err error)

func (BatchErrorContinuationOption) String

type BlockCipherMode

type BlockCipherMode uint32

9.1.3.2.14 Table 302

const (
	BlockCipherModeCBC               BlockCipherMode = 0x00000001
	BlockCipherModeECB               BlockCipherMode = 0x00000002
	BlockCipherModePCBC              BlockCipherMode = 0x00000003
	BlockCipherModeCFB               BlockCipherMode = 0x00000004
	BlockCipherModeOFB               BlockCipherMode = 0x00000005
	BlockCipherModeCTR               BlockCipherMode = 0x00000006
	BlockCipherModeCMAC              BlockCipherMode = 0x00000007
	BlockCipherModeCCM               BlockCipherMode = 0x00000008
	BlockCipherModeGCM               BlockCipherMode = 0x00000009
	BlockCipherModeCBC_MAC           BlockCipherMode = 0x0000000a
	BlockCipherModeXTS               BlockCipherMode = 0x0000000b
	BlockCipherModeAESKeyWrapPadding BlockCipherMode = 0x0000000c
	BlockCipherModeNISTKeyWrap       BlockCipherMode = 0x0000000d
	BlockCipherModeX9_102AESKW       BlockCipherMode = 0x0000000e
	BlockCipherModeX9_102TDKW        BlockCipherMode = 0x0000000f
	BlockCipherModeX9_102AKW1        BlockCipherMode = 0x00000010
	BlockCipherModeX9_102AKW2        BlockCipherMode = 0x00000011
	BlockCipherModeAEAD              BlockCipherMode = 0x00000012
)

func (BlockCipherMode) MarshalTTLV

func (b BlockCipherMode) MarshalTTLV(enc *Encoder, tag Tag) error

func (BlockCipherMode) MarshalText

func (b BlockCipherMode) MarshalText() (text []byte, err error)

func (BlockCipherMode) String

func (b BlockCipherMode) String() string

type CancellationResult

type CancellationResult uint32

9.1.3.2.25 Table 313

const (
	CancellationResultCanceled       CancellationResult = 0x00000001
	CancellationResultUnableToCancel CancellationResult = 0x00000002
	CancellationResultCompleted      CancellationResult = 0x00000003
	CancellationResultFailed         CancellationResult = 0x00000004
	CancellationResultUnavailable    CancellationResult = 0x00000005
)

func (CancellationResult) MarshalTTLV

func (c CancellationResult) MarshalTTLV(enc *Encoder, tag Tag) error

func (CancellationResult) MarshalText

func (c CancellationResult) MarshalText() (text []byte, err error)

func (CancellationResult) String

func (c CancellationResult) String() string

type CertificateRequestType

type CertificateRequestType uint32

9.1.3.2.22 Table 310

const (
	CertificateRequestTypeCRMF    CertificateRequestType = 0x00000001
	CertificateRequestTypePKCS_10 CertificateRequestType = 0x00000002
	CertificateRequestTypePEM     CertificateRequestType = 0x00000003
	CertificateRequestTypePGP     CertificateRequestType = 0x00000004
)

func (CertificateRequestType) MarshalTTLV

func (c CertificateRequestType) MarshalTTLV(enc *Encoder, tag Tag) error

func (CertificateRequestType) MarshalText

func (c CertificateRequestType) MarshalText() (text []byte, err error)

func (CertificateRequestType) String

func (c CertificateRequestType) String() string

type CertificateType

type CertificateType uint32

9.1.3.2.6 Table 294

const (
	CertificateTypeX_509 CertificateType = 0x00000001
	CertificateTypePGP   CertificateType = 0x00000002
)

func (CertificateType) MarshalTTLV

func (c CertificateType) MarshalTTLV(enc *Encoder, tag Tag) error

func (CertificateType) MarshalText

func (c CertificateType) MarshalText() (text []byte, err error)

func (CertificateType) String

func (c CertificateType) String() string

type ClientRegistrationMethod

type ClientRegistrationMethod uint32

9.1.3.2.47

const (
	ClientRegistrationMethodUnspecified        ClientRegistrationMethod = 0x00000001
	ClientRegistrationMethodServerPreGenerated ClientRegistrationMethod = 0x00000002
	ClientRegistrationMethodServerOnDemand     ClientRegistrationMethod = 0x00000003
	ClientRegistrationMethodClientGenerated    ClientRegistrationMethod = 0x00000004
	ClientRegistrationMethodClientRegistered   ClientRegistrationMethod = 0x00000005
)

func (ClientRegistrationMethod) MarshalTTLV

func (c ClientRegistrationMethod) MarshalTTLV(enc *Encoder, tag Tag) error

func (ClientRegistrationMethod) MarshalText

func (c ClientRegistrationMethod) MarshalText() (text []byte, err error)

func (ClientRegistrationMethod) String

func (c ClientRegistrationMethod) String() string

type CredentialType

type CredentialType uint32

9.1.3.2.1 Table 289

const (
	CredentialTypeUsernameAndPassword CredentialType = 0x00000001
	CredentialTypeDevice              CredentialType = 0x00000002
	CredentialTypeAttestation         CredentialType = 0x00000003
)

func (CredentialType) MarshalTTLV

func (c CredentialType) MarshalTTLV(enc *Encoder, tag Tag) error

func (CredentialType) MarshalText

func (c CredentialType) MarshalText() (text []byte, err error)

func (CredentialType) String

func (c CredentialType) String() string

type CryptographicAlgorithm

type CryptographicAlgorithm uint32

9.1.3.2.13 Table 301

const (
	CryptographicAlgorithmDES              CryptographicAlgorithm = 0x00000001
	CryptographicAlgorithmDES3             CryptographicAlgorithm = 0x00000002
	CryptographicAlgorithmAES              CryptographicAlgorithm = 0x00000003
	CryptographicAlgorithmRSA              CryptographicAlgorithm = 0x00000004
	CryptographicAlgorithmDSA              CryptographicAlgorithm = 0x00000005
	CryptographicAlgorithmECDSA            CryptographicAlgorithm = 0x00000006
	CryptographicAlgorithmHMAC_SHA1        CryptographicAlgorithm = 0x00000007
	CryptographicAlgorithmHMAC_SHA224      CryptographicAlgorithm = 0x00000008
	CryptographicAlgorithmHMAC_SHA256      CryptographicAlgorithm = 0x00000009
	CryptographicAlgorithmHMAC_SHA384      CryptographicAlgorithm = 0x0000000a
	CryptographicAlgorithmHMAC_SHA512      CryptographicAlgorithm = 0x0000000b
	CryptographicAlgorithmHMAC_MD5         CryptographicAlgorithm = 0x0000000c
	CryptographicAlgorithmDH               CryptographicAlgorithm = 0x0000000d
	CryptographicAlgorithmECDH             CryptographicAlgorithm = 0x0000000e
	CryptographicAlgorithmECMQV            CryptographicAlgorithm = 0x0000000f
	CryptographicAlgorithmBlowfish         CryptographicAlgorithm = 0x00000010
	CryptographicAlgorithmCamellia         CryptographicAlgorithm = 0x00000011
	CryptographicAlgorithmCAST5            CryptographicAlgorithm = 0x00000012
	CryptographicAlgorithmIDEA             CryptographicAlgorithm = 0x00000013
	CryptographicAlgorithmMARS             CryptographicAlgorithm = 0x00000014
	CryptographicAlgorithmRC2              CryptographicAlgorithm = 0x00000015
	CryptographicAlgorithmRC4              CryptographicAlgorithm = 0x00000016
	CryptographicAlgorithmRC5              CryptographicAlgorithm = 0x00000017
	CryptographicAlgorithmSKIPJACK         CryptographicAlgorithm = 0x00000018
	CryptographicAlgorithmTwofish          CryptographicAlgorithm = 0x00000019
	CryptographicAlgorithmEC               CryptographicAlgorithm = 0x0000001a
	CryptographicAlgorithmOneTimePad       CryptographicAlgorithm = 0x0000001b
	CryptographicAlgorithmChaCha20         CryptographicAlgorithm = 0x0000001c
	CryptographicAlgorithmPoly1305         CryptographicAlgorithm = 0x0000001d
	CryptographicAlgorithmChaCha20Poly1305 CryptographicAlgorithm = 0x0000001e
	CryptographicAlgorithmSHA3_224         CryptographicAlgorithm = 0x0000001f
	CryptographicAlgorithmSHA3_256         CryptographicAlgorithm = 0x00000020
	CryptographicAlgorithmSHA3_384         CryptographicAlgorithm = 0x00000021
	CryptographicAlgorithmSHA3_512         CryptographicAlgorithm = 0x00000022
	CryptographicAlgorithmHMAC_SHA3_224    CryptographicAlgorithm = 0x00000023
	CryptographicAlgorithmHMAC_SHA3_256    CryptographicAlgorithm = 0x00000024
	CryptographicAlgorithmHMAC_SHA3_384    CryptographicAlgorithm = 0x00000025
	CryptographicAlgorithmHMAC_SHA3_512    CryptographicAlgorithm = 0x00000026
	CryptographicAlgorithmSHAKE_128        CryptographicAlgorithm = 0x00000027
	CryptographicAlgorithmSHAKE_256        CryptographicAlgorithm = 0x00000028
)

func (CryptographicAlgorithm) MarshalTTLV

func (c CryptographicAlgorithm) MarshalTTLV(enc *Encoder, tag Tag) error

func (CryptographicAlgorithm) MarshalText

func (c CryptographicAlgorithm) MarshalText() (text []byte, err error)

func (CryptographicAlgorithm) String

func (c CryptographicAlgorithm) String() string

type CryptographicUsageMask

type CryptographicUsageMask uint32

9.1.3.3.1

const (
	CryptographicUsageMaskSign               CryptographicUsageMask = 0x00000001
	CryptographicUsageMaskVerify             CryptographicUsageMask = 0x00000002
	CryptographicUsageMaskEncrypt            CryptographicUsageMask = 0x00000004
	CryptographicUsageMaskDecrypt            CryptographicUsageMask = 0x00000008
	CryptographicUsageMaskWrapKey            CryptographicUsageMask = 0x00000010
	CryptographicUsageMaskUnwrapKey          CryptographicUsageMask = 0x00000020
	CryptographicUsageMaskExport             CryptographicUsageMask = 0x00000040
	CryptographicUsageMaskMACGenerate        CryptographicUsageMask = 0x00000080
	CryptographicUsageMaskMACVerify          CryptographicUsageMask = 0x00000100
	CryptographicUsageMaskDeriveKey          CryptographicUsageMask = 0x00000200
	CryptographicUsageMaskContentCommitment  CryptographicUsageMask = 0x00000400
	CryptographicUsageMaskKeyAgreement       CryptographicUsageMask = 0x00000800
	CryptographicUsageMaskCertificateSign    CryptographicUsageMask = 0x00001000
	CryptographicUsageMaskCRLSign            CryptographicUsageMask = 0x00002000
	CryptographicUsageMaskGenerateCryptogram CryptographicUsageMask = 0x00004000
	CryptographicUsageMaskValidateCryptogram CryptographicUsageMask = 0x00008000
	CryptographicUsageMaskTranslateEncrypt   CryptographicUsageMask = 0x00010000
	CryptographicUsageMaskTranslateDecrypt   CryptographicUsageMask = 0x00020000
	CryptographicUsageMaskTranslateWrap      CryptographicUsageMask = 0x00040000
	CryptographicUsageMaskTranslateUnwrap    CryptographicUsageMask = 0x00080000
)

func (CryptographicUsageMask) MarshalText

func (c CryptographicUsageMask) MarshalText() (text []byte, err error)

func (CryptographicUsageMask) String

func (c CryptographicUsageMask) String() string

type DRBGAlgorithm

type DRBGAlgorithm uint32

9.1.3.2.38

const (
	DRBGAlgorithmUnspecified DRBGAlgorithm = 0x00000001
	DRBGAlgorithmDual_EC     DRBGAlgorithm = 0x00000002
	DRBGAlgorithmHash        DRBGAlgorithm = 0x00000003
	DRBGAlgorithmHMAC        DRBGAlgorithm = 0x00000004
	DRBGAlgorithmCTR         DRBGAlgorithm = 0x00000005
)

func (DRBGAlgorithm) MarshalTTLV

func (d DRBGAlgorithm) MarshalTTLV(enc *Encoder, tag Tag) error

func (DRBGAlgorithm) MarshalText

func (d DRBGAlgorithm) MarshalText() (text []byte, err error)

func (DRBGAlgorithm) String

func (d DRBGAlgorithm) String() string

type DateTimeExtended

type DateTimeExtended struct {
	time.Time
}

func (DateTimeExtended) MarshalTTLV

func (t DateTimeExtended) MarshalTTLV(e *Encoder, tag Tag) error

func (*DateTimeExtended) UnmarshalTTLV

func (t *DateTimeExtended) UnmarshalTTLV(d *Decoder, ttlv TTLV) error

type Decoder

type Decoder struct {
	DisallowExtraValues bool
	// contains filtered or unexported fields
}

func NewDecoder

func NewDecoder(r io.Reader) *Decoder

func (*Decoder) Decode

func (dec *Decoder) Decode(v interface{}) error

func (*Decoder) DecodeValue

func (dec *Decoder) DecodeValue(v interface{}, ttlv TTLV) error

func (*Decoder) NextTTLV

func (dec *Decoder) NextTTLV() (TTLV, error)

func (*Decoder) Reset

func (dec *Decoder) Reset(r io.Reader)

type DerivationMethod

type DerivationMethod uint32

9.1.3.2.21 Table 309

const (
	DerivationMethodPBKDF2          DerivationMethod = 0x00000001
	DerivationMethodHASH            DerivationMethod = 0x00000002
	DerivationMethodHMAC            DerivationMethod = 0x00000003
	DerivationMethodENCRYPT         DerivationMethod = 0x00000004
	DerivationMethodNIST800_108_C   DerivationMethod = 0x00000005
	DerivationMethodNIST800_108_F   DerivationMethod = 0x00000006
	DerivationMethodNIST800_108_DPI DerivationMethod = 0x00000007
	DerivationMethodAsymmetricKey   DerivationMethod = 0x00000008
)

func (DerivationMethod) MarshalTTLV

func (d DerivationMethod) MarshalTTLV(enc *Encoder, tag Tag) error

func (DerivationMethod) MarshalText

func (d DerivationMethod) MarshalText() (text []byte, err error)

func (DerivationMethod) String

func (d DerivationMethod) String() string

type DestroyAction

type DestroyAction uint32

9.1.3.2.44

const (
	DestroyActionUnspecified         DestroyAction = 0x00000001
	DestroyActionKeyMaterialDeleted  DestroyAction = 0x00000002
	DestroyActionKeyMaterialShredded DestroyAction = 0x00000003
	DestroyActionMetaDataDeleted     DestroyAction = 0x00000004
	DestroyActionMetaDataShredded    DestroyAction = 0x00000005
	DestroyActionDeleted             DestroyAction = 0x00000006
	DestroyActionShredded            DestroyAction = 0x00000007
)

func (DestroyAction) MarshalTTLV

func (d DestroyAction) MarshalTTLV(enc *Encoder, tag Tag) error

func (DestroyAction) MarshalText

func (d DestroyAction) MarshalText() (text []byte, err error)

func (DestroyAction) String

func (d DestroyAction) String() string

type DigitalSignatureAlgorithm

type DigitalSignatureAlgorithm uint32

9.1.3.2.7 Table 295

const (
	DigitalSignatureAlgorithmMD2WithRSAEncryption      DigitalSignatureAlgorithm = 0x00000001
	DigitalSignatureAlgorithmMD5WithRSAEncryption      DigitalSignatureAlgorithm = 0x00000002
	DigitalSignatureAlgorithmSHA_1WithRSAEncryption    DigitalSignatureAlgorithm = 0x00000003
	DigitalSignatureAlgorithmSHA_224WithRSAEncryption  DigitalSignatureAlgorithm = 0x00000004
	DigitalSignatureAlgorithmSHA_256WithRSAEncryption  DigitalSignatureAlgorithm = 0x00000005
	DigitalSignatureAlgorithmSHA_384WithRSAEncryption  DigitalSignatureAlgorithm = 0x00000006
	DigitalSignatureAlgorithmSHA_512WithRSAEncryption  DigitalSignatureAlgorithm = 0x00000007
	DigitalSignatureAlgorithmRSASSA_PSS                DigitalSignatureAlgorithm = 0x00000008
	DigitalSignatureAlgorithmDSAWithSHA_1              DigitalSignatureAlgorithm = 0x00000009
	DigitalSignatureAlgorithmDSAWithSHA224             DigitalSignatureAlgorithm = 0x0000000a
	DigitalSignatureAlgorithmDSAWithSHA256             DigitalSignatureAlgorithm = 0x0000000b
	DigitalSignatureAlgorithmECDSAWithSHA_1            DigitalSignatureAlgorithm = 0x0000000c
	DigitalSignatureAlgorithmECDSAWithSHA224           DigitalSignatureAlgorithm = 0x0000000d
	DigitalSignatureAlgorithmECDSAWithSHA256           DigitalSignatureAlgorithm = 0x0000000e
	DigitalSignatureAlgorithmECDSAWithSHA384           DigitalSignatureAlgorithm = 0x0000000f
	DigitalSignatureAlgorithmECDSAWithSHA512           DigitalSignatureAlgorithm = 0x00000010
	DigitalSignatureAlgorithmSHA3_256WithRSAEncryption DigitalSignatureAlgorithm = 0x00000011
	DigitalSignatureAlgorithmSHA3_384WithRSAEncryption DigitalSignatureAlgorithm = 0x00000012
	DigitalSignatureAlgorithmSHA3_512WithRSAEncryption DigitalSignatureAlgorithm = 0x00000013
)

func (DigitalSignatureAlgorithm) MarshalTTLV

func (d DigitalSignatureAlgorithm) MarshalTTLV(enc *Encoder, tag Tag) error

func (DigitalSignatureAlgorithm) MarshalText

func (d DigitalSignatureAlgorithm) MarshalText() (text []byte, err error)

func (DigitalSignatureAlgorithm) String

func (d DigitalSignatureAlgorithm) String() string

type Encoder

type Encoder struct {
	// contains filtered or unexported fields
}

func NewEncoder

func NewEncoder(w io.Writer) *Encoder

func (*Encoder) Encode

func (e *Encoder) Encode(v interface{}) error

func (*Encoder) EncodeBigInt

func (e *Encoder) EncodeBigInt(tag Tag, v *big.Int)

func (*Encoder) EncodeBool

func (e *Encoder) EncodeBool(tag Tag, v bool)

func (*Encoder) EncodeByteString

func (e *Encoder) EncodeByteString(tag Tag, v []byte)

func (*Encoder) EncodeDateTime

func (e *Encoder) EncodeDateTime(tag Tag, v time.Time)

func (*Encoder) EncodeDateTimeExtended

func (e *Encoder) EncodeDateTimeExtended(tag Tag, v time.Time)

func (*Encoder) EncodeEnumeration

func (e *Encoder) EncodeEnumeration(tag Tag, v uint32)

func (*Encoder) EncodeInt

func (e *Encoder) EncodeInt(tag Tag, v int32)

func (*Encoder) EncodeInterval

func (e *Encoder) EncodeInterval(tag Tag, v time.Duration)

func (*Encoder) EncodeLongInt

func (e *Encoder) EncodeLongInt(tag Tag, v int64)

func (*Encoder) EncodeStructure

func (e *Encoder) EncodeStructure(tag Tag, f func(e *Encoder) error) error

func (*Encoder) EncodeTextString

func (e *Encoder) EncodeTextString(tag Tag, v string)

func (*Encoder) EncodeValue

func (e *Encoder) EncodeValue(tag Tag, v interface{}) error

func (*Encoder) Flush

func (e *Encoder) Flush() error

type EncodingOption

type EncodingOption uint32

9.1.3.2.32 Table 320

const (
	EncodingOptionNoEncoding   EncodingOption = 0x00000001
	EncodingOptionTTLVEncoding EncodingOption = 0x00000002
)

func (EncodingOption) MarshalTTLV

func (e EncodingOption) MarshalTTLV(enc *Encoder, tag Tag) error

func (EncodingOption) MarshalText

func (e EncodingOption) MarshalText() (text []byte, err error)

func (EncodingOption) String

func (e EncodingOption) String() string

type EnumTypeDef

type EnumTypeDef struct {
	Parse  func(s string) (uint32, bool)
	String func(v uint32) string
	Typed  func(v uint32) interface{}
}

type EnumValue

type EnumValue uint32

func (EnumValue) MarshalTTLV

func (v EnumValue) MarshalTTLV(e *Encoder, tag Tag) error

type FIPS186Variation

type FIPS186Variation uint32

9.1.3.2.39

const (
	FIPS186VariationUnspecified     FIPS186Variation = 0x00000001
	FIPS186VariationGPXOriginal     FIPS186Variation = 0x00000002
	FIPS186VariationGPXChangeNotice FIPS186Variation = 0x00000003
	FIPS186VariationXOriginal       FIPS186Variation = 0x00000004
	FIPS186VariationXChangeNotice   FIPS186Variation = 0x00000005
	FIPS186VariationKOriginal       FIPS186Variation = 0x00000006
	FIPS186VariationKChangeNotice   FIPS186Variation = 0x00000007
)

func (FIPS186Variation) MarshalTTLV

func (f FIPS186Variation) MarshalTTLV(enc *Encoder, tag Tag) error

func (FIPS186Variation) MarshalText

func (f FIPS186Variation) MarshalText() (text []byte, err error)

func (FIPS186Variation) String

func (f FIPS186Variation) String() string

type HashingAlgorithm

type HashingAlgorithm uint32

9.1.3.2.16 Table 304

const (
	HashingAlgorithmMD2         HashingAlgorithm = 0x00000001
	HashingAlgorithmMD4         HashingAlgorithm = 0x00000002
	HashingAlgorithmMD5         HashingAlgorithm = 0x00000003
	HashingAlgorithmSHA_1       HashingAlgorithm = 0x00000004
	HashingAlgorithmSHA_224     HashingAlgorithm = 0x00000005
	HashingAlgorithmSHA_256     HashingAlgorithm = 0x00000006
	HashingAlgorithmSHA_384     HashingAlgorithm = 0x00000007
	HashingAlgorithmSHA_512     HashingAlgorithm = 0x00000008
	HashingAlgorithmRIPEMD_160  HashingAlgorithm = 0x00000009
	HashingAlgorithmTiger       HashingAlgorithm = 0x0000000a
	HashingAlgorithmWhirlpool   HashingAlgorithm = 0x0000000b
	HashingAlgorithmSHA_512_224 HashingAlgorithm = 0x0000000c
	HashingAlgorithmSHA_512_256 HashingAlgorithm = 0x0000000d
	HashingAlgorithmSHA_3_224   HashingAlgorithm = 0x0000000e
	HashingAlgorithmSHA_3_256   HashingAlgorithm = 0x0000000f
	HashingAlgorithmSHA_3_384   HashingAlgorithm = 0x00000010
	HashingAlgorithmSHA_3_512   HashingAlgorithm = 0x00000011
)

func (HashingAlgorithm) MarshalTTLV

func (h HashingAlgorithm) MarshalTTLV(enc *Encoder, tag Tag) error

func (HashingAlgorithm) MarshalText

func (h HashingAlgorithm) MarshalText() (text []byte, err error)

func (HashingAlgorithm) String

func (h HashingAlgorithm) String() string

type KeyCompressionType

type KeyCompressionType uint32

9.1.3.2.2 Table 290

const (
	KeyCompressionTypeECPublicKeyTypeUncompressed         KeyCompressionType = 0x00000001
	KeyCompressionTypeECPublicKeyTypeX9_62CompressedPrime KeyCompressionType = 0x00000002
	KeyCompressionTypeECPublicKeyTypeX9_62CompressedChar2 KeyCompressionType = 0x00000003
	KeyCompressionTypeECPublicKeyTypeX9_62Hybrid          KeyCompressionType = 0x00000004
)

func (KeyCompressionType) MarshalTTLV

func (k KeyCompressionType) MarshalTTLV(enc *Encoder, tag Tag) error

func (KeyCompressionType) MarshalText

func (k KeyCompressionType) MarshalText() (text []byte, err error)

func (KeyCompressionType) String

func (k KeyCompressionType) String() string

type KeyFormatType

type KeyFormatType uint32

9.1.3.2.3 Table 291

const (
	KeyFormatTypeRaw                        KeyFormatType = 0x00000001
	KeyFormatTypeOpaque                     KeyFormatType = 0x00000002
	KeyFormatTypePKCS_1                     KeyFormatType = 0x00000003
	KeyFormatTypePKCS_8                     KeyFormatType = 0x00000004
	KeyFormatTypeX_509                      KeyFormatType = 0x00000005
	KeyFormatTypeECPrivateKey               KeyFormatType = 0x00000006
	KeyFormatTypeTransparentSymmetricKey    KeyFormatType = 0x00000007
	KeyFormatTypeTransparentDSAPrivateKey   KeyFormatType = 0x00000008
	KeyFormatTypeTransparentDSAPublicKey    KeyFormatType = 0x00000009
	KeyFormatTypeTransparentRSAPrivateKey   KeyFormatType = 0x0000000a
	KeyFormatTypeTransparentRSAPublicKey    KeyFormatType = 0x0000000b
	KeyFormatTypeTransparentDHPrivateKey    KeyFormatType = 0x0000000c
	KeyFormatTypeTransparentDHPublicKey     KeyFormatType = 0x0000000d
	KeyFormatTypeTransparentECDSAPrivateKey KeyFormatType = 0x0000000e
	KeyFormatTypeTransparentECDSAPublicKey  KeyFormatType = 0x0000000f
	KeyFormatTypeTransparentECDHPrivateKey  KeyFormatType = 0x00000010
	KeyFormatTypeTransparentECDHPublicKey   KeyFormatType = 0x00000011
	KeyFormatTypeTransparentECMQVPrivateKey KeyFormatType = 0x00000012
	KeyFormatTypeTransparentECMQVPublicKey  KeyFormatType = 0x00000013
	KeyFormatTypeTransparentECPrivateKey    KeyFormatType = 0x00000014
	KeyFormatTypeTransparentECPublicKey     KeyFormatType = 0x00000015
	KeyFormatTypePKCS_12                    KeyFormatType = 0x00000016
)

func (KeyFormatType) MarshalTTLV

func (k KeyFormatType) MarshalTTLV(enc *Encoder, tag Tag) error

func (KeyFormatType) MarshalText

func (k KeyFormatType) MarshalText() (text []byte, err error)

func (KeyFormatType) String

func (k KeyFormatType) String() string

type KeyRoleType

type KeyRoleType uint32

9.1.3.2.17 Table 305

const (
	KeyRoleTypeBDK      KeyRoleType = 0x00000001
	KeyRoleTypeCVK      KeyRoleType = 0x00000002
	KeyRoleTypeDEK      KeyRoleType = 0x00000003
	KeyRoleTypeMKAC     KeyRoleType = 0x00000004
	KeyRoleTypeMKSMC    KeyRoleType = 0x00000005
	KeyRoleTypeMKSMI    KeyRoleType = 0x00000006
	KeyRoleTypeMKDAC    KeyRoleType = 0x00000007
	KeyRoleTypeMKDN     KeyRoleType = 0x00000008
	KeyRoleTypeMKCP     KeyRoleType = 0x00000009
	KeyRoleTypeMKOTH    KeyRoleType = 0x0000000a
	KeyRoleTypeKEK      KeyRoleType = 0x0000000b
	KeyRoleTypeMAC16609 KeyRoleType = 0x0000000c
	KeyRoleTypeMAC97971 KeyRoleType = 0x0000000d
	KeyRoleTypeMAC97972 KeyRoleType = 0x0000000e
	KeyRoleTypeMAC97973 KeyRoleType = 0x0000000f
	KeyRoleTypeMAC97974 KeyRoleType = 0x00000010
	KeyRoleTypeMAC97975 KeyRoleType = 0x00000011
	KeyRoleTypeZPK      KeyRoleType = 0x00000012
	KeyRoleTypePVKIBM   KeyRoleType = 0x00000013
	KeyRoleTypePVKPVV   KeyRoleType = 0x00000014
	KeyRoleTypePVKOTH   KeyRoleType = 0x00000015
	KeyRoleTypeDUKPT    KeyRoleType = 0x00000016
	KeyRoleTypeIV       KeyRoleType = 0x00000017
	KeyRoleTypeTRKBK    KeyRoleType = 0x00000018
)

func (KeyRoleType) MarshalTTLV

func (k KeyRoleType) MarshalTTLV(enc *Encoder, tag Tag) error

func (KeyRoleType) MarshalText

func (k KeyRoleType) MarshalText() (text []byte, err error)

func (KeyRoleType) String

func (k KeyRoleType) String() string

type KeyValueLocationType

type KeyValueLocationType uint32

9.1.3.2.35 Table 323

const (
	KeyValueLocationTypeUninterpretedTextString KeyValueLocationType = 0x00000001
	KeyValueLocationTypeURI                     KeyValueLocationType = 0x00000002
)

func (KeyValueLocationType) MarshalTTLV

func (k KeyValueLocationType) MarshalTTLV(enc *Encoder, tag Tag) error

func (KeyValueLocationType) MarshalText

func (k KeyValueLocationType) MarshalText() (text []byte, err error)

func (KeyValueLocationType) String

func (k KeyValueLocationType) String() string

type KeyWrapType

type KeyWrapType uint32

9.1.3.2.48

const (
	KeyWrapTypeNotWrapped   KeyWrapType = 0x00000001
	KeyWrapTypeAsRegistered KeyWrapType = 0x00000002
)

func (KeyWrapType) MarshalTTLV

func (k KeyWrapType) MarshalTTLV(enc *Encoder, tag Tag) error

func (KeyWrapType) MarshalText

func (k KeyWrapType) MarshalText() (text []byte, err error)

func (KeyWrapType) String

func (k KeyWrapType) String() string

type LinkType

type LinkType uint32

9.1.3.2.20 Table 308

const (
	LinkTypeCertificateLink          LinkType = 0x00000101
	LinkTypePublicKeyLink            LinkType = 0x00000102
	LinkTypePrivateKeyLink           LinkType = 0x00000103
	LinkTypeDerivationBaseObjectLink LinkType = 0x00000104
	LinkTypeDerivedKeyLink           LinkType = 0x00000105
	LinkTypeReplacementObjectLink    LinkType = 0x00000106
	LinkTypeReplacedObjectLink       LinkType = 0x00000107
	LinkTypeParentLink               LinkType = 0x00000108
	LinkTypeChildLink                LinkType = 0x00000109
	LinkTypePreviousLink             LinkType = 0x0000010a
	LinkTypeNextLink                 LinkType = 0x0000010b
	LinkTypePKCS_12CertificateLink   LinkType = 0x0000010c
	LinkTypePKCS_12PasswordLink      LinkType = 0x0000010d
)

func (LinkType) MarshalTTLV

func (l LinkType) MarshalTTLV(enc *Encoder, tag Tag) error

func (LinkType) MarshalText

func (l LinkType) MarshalText() (text []byte, err error)

func (LinkType) String

func (l LinkType) String() string

type Marshaler

type Marshaler interface {
	MarshalTTLV(e *Encoder, tag Tag) error
}

type MarshalerError

type MarshalerError struct {
	Type   reflect.Type
	Struct string
	Field  string
	Tag    Tag
}

func (*MarshalerError) Error

func (e *MarshalerError) Error() string

type MaskGenerator

type MaskGenerator uint32

9.1.3.2.49

const (
	MaskGeneratorMGF1 MaskGenerator = 0x00000001
)

func (MaskGenerator) MarshalTTLV

func (m MaskGenerator) MarshalTTLV(enc *Encoder, tag Tag) error

func (MaskGenerator) MarshalText

func (m MaskGenerator) MarshalText() (text []byte, err error)

func (MaskGenerator) String

func (m MaskGenerator) String() string

type NameType

type NameType uint32

9.1.3.2.11 Table 299

const (
	NameTypeUninterpretedTextString NameType = 0x00000001
	NameTypeURI                     NameType = 0x00000002
)

func (NameType) MarshalTTLV

func (n NameType) MarshalTTLV(enc *Encoder, tag Tag) error

func (NameType) MarshalText

func (n NameType) MarshalText() (text []byte, err error)

func (NameType) String

func (n NameType) String() string

type ObjectGroupMember

type ObjectGroupMember uint32

9.1.3.2.33 Table 321

const (
	ObjectGroupMemberGroupMemberFresh   ObjectGroupMember = 0x00000001
	ObjectGroupMemberGroupMemberDefault ObjectGroupMember = 0x00000002
)

func (ObjectGroupMember) MarshalTTLV

func (o ObjectGroupMember) MarshalTTLV(enc *Encoder, tag Tag) error

func (ObjectGroupMember) MarshalText

func (o ObjectGroupMember) MarshalText() (text []byte, err error)

func (ObjectGroupMember) String

func (o ObjectGroupMember) String() string

type ObjectType

type ObjectType uint32

9.1.3.2.12 Table 300

const (
	ObjectTypeCertificate  ObjectType = 0x00000001
	ObjectTypeSymmetricKey ObjectType = 0x00000002
	ObjectTypePublicKey    ObjectType = 0x00000003
	ObjectTypePrivateKey   ObjectType = 0x00000004
	ObjectTypeSplitKey     ObjectType = 0x00000005
	ObjectTypeTemplate     ObjectType = 0x00000006
	ObjectTypeSecretData   ObjectType = 0x00000007
	ObjectTypeOpaqueObject ObjectType = 0x00000008
	ObjectTypePGPKey       ObjectType = 0x00000009
)

func (ObjectType) MarshalTTLV

func (o ObjectType) MarshalTTLV(enc *Encoder, tag Tag) error

func (ObjectType) MarshalText

func (o ObjectType) MarshalText() (text []byte, err error)

func (ObjectType) String

func (o ObjectType) String() string

type OpaqueDataType

type OpaqueDataType uint32

9.1.3.2.10 Table 298

func (OpaqueDataType) MarshalTTLV

func (o OpaqueDataType) MarshalTTLV(enc *Encoder, tag Tag) error

func (OpaqueDataType) MarshalText

func (o OpaqueDataType) MarshalText() (text []byte, err error)

func (OpaqueDataType) String

func (o OpaqueDataType) String() string

type Operation

type Operation uint32

9.1.3.2.27 Table 315

const (
	OperationCreate             Operation = 0x00000001
	OperationCreateKeyPair      Operation = 0x00000002
	OperationRegister           Operation = 0x00000003
	OperationReKey              Operation = 0x00000004
	OperationDeriveKey          Operation = 0x00000005
	OperationCertify            Operation = 0x00000006
	OperationReCertify          Operation = 0x00000007
	OperationLocate             Operation = 0x00000008
	OperationCheck              Operation = 0x00000009
	OperationGet                Operation = 0x0000000a
	OperationGetAttributes      Operation = 0x0000000b
	OperationGetAttributeList   Operation = 0x0000000c
	OperationAddAttribute       Operation = 0x0000000d
	OperationModifyAttribute    Operation = 0x0000000e
	OperationDeleteAttribute    Operation = 0x0000000f
	OperationObtainLease        Operation = 0x00000010
	OperationGetUsageAllocation Operation = 0x00000011
	OperationActivate           Operation = 0x00000012
	OperationRevoke             Operation = 0x00000013
	OperationDestroy            Operation = 0x00000014
	OperationArchive            Operation = 0x00000015
	OperationRecover            Operation = 0x00000016
	OperationValidate           Operation = 0x00000017
	OperationQuery              Operation = 0x00000018
	OperationCancel             Operation = 0x00000019
	OperationPoll               Operation = 0x0000001a
	OperationNotify             Operation = 0x0000001b
	OperationPut                Operation = 0x0000001c
	OperationReKeyKeyPair       Operation = 0x0000001d
	OperationDiscoverVersions   Operation = 0x0000001e
	OperationEncrypt            Operation = 0x0000001f
	OperationDecrypt            Operation = 0x00000020
	OperationSign               Operation = 0x00000021
	OperationSignatureVerify    Operation = 0x00000022
	OperationMAC                Operation = 0x00000023
	OperationMACVerify          Operation = 0x00000024
	OperationRNGRetrieve        Operation = 0x00000025
	OperationRNGSeed            Operation = 0x00000026
	OperationHash               Operation = 0x00000027
	OperationCreateSplitKey     Operation = 0x00000028
	OperationJoinSplitKey       Operation = 0x00000029
	OperationImport             Operation = 0x0000002a
	OperationExport             Operation = 0x0000002b
)

func (Operation) MarshalTTLV

func (o Operation) MarshalTTLV(enc *Encoder, tag Tag) error

func (Operation) MarshalText

func (o Operation) MarshalText() (text []byte, err error)

func (Operation) String

func (o Operation) String() string

type PaddingMethod

type PaddingMethod uint32

9.1.3.2.15 Table 303

const (
	PaddingMethodNone      PaddingMethod = 0x00000001
	PaddingMethodOAEP      PaddingMethod = 0x00000002
	PaddingMethodPKCS5     PaddingMethod = 0x00000003
	PaddingMethodSSL3      PaddingMethod = 0x00000004
	PaddingMethodZeros     PaddingMethod = 0x00000005
	PaddingMethodANSIX9_23 PaddingMethod = 0x00000006
	PaddingMethodISO10126  PaddingMethod = 0x00000007
	PaddingMethodPKCS1V1_5 PaddingMethod = 0x00000008
	PaddingMethodX9_31     PaddingMethod = 0x00000009
	PaddingMethodPSS       PaddingMethod = 0x0000000a
)

func (PaddingMethod) MarshalTTLV

func (p PaddingMethod) MarshalTTLV(enc *Encoder, tag Tag) error

func (PaddingMethod) MarshalText

func (p PaddingMethod) MarshalText() (text []byte, err error)

func (PaddingMethod) String

func (p PaddingMethod) String() string

type ProfileName

type ProfileName uint32

9.1.3.2.42

const (
	ProfileNameBaselineServerBasicKMIPV1_2                       ProfileName = 0x00000001
	ProfileNameBaselineServerTLSV1_2KMIPV1_2                     ProfileName = 0x00000002
	ProfileNameBaselineClientBasicKMIPV1_2                       ProfileName = 0x00000003
	ProfileNameBaselineClientTLSV1_2KMIPV1_2                     ProfileName = 0x00000004
	ProfileNameCompleteServerBasicKMIPV1_2                       ProfileName = 0x00000005
	ProfileNameCompleteServerTLSV1_2KMIPV1_2                     ProfileName = 0x00000006
	ProfileNameTapeLibraryClientKMIPV1_0                         ProfileName = 0x00000007
	ProfileNameTapeLibraryClientKMIPV1_1                         ProfileName = 0x00000008
	ProfileNameTapeLibraryClientKMIPV1_2                         ProfileName = 0x00000009
	ProfileNameTapeLibraryServerKMIPV1_0                         ProfileName = 0x0000000a
	ProfileNameTapeLibraryServerKMIPV1_1                         ProfileName = 0x0000000b
	ProfileNameTapeLibraryServerKMIPV1_2                         ProfileName = 0x0000000c
	ProfileNameSymmetricKeyLifecycleClientKMIPV1_0               ProfileName = 0x0000000d
	ProfileNameSymmetricKeyLifecycleClientKMIPV1_1               ProfileName = 0x0000000e
	ProfileNameSymmetricKeyLifecycleClientKMIPV1_2               ProfileName = 0x0000000f
	ProfileNameSymmetricKeyLifecycleServerKMIPV1_0               ProfileName = 0x00000010
	ProfileNameSymmetricKeyLifecycleServerKMIPV1_1               ProfileName = 0x00000011
	ProfileNameSymmetricKeyLifecycleServerKMIPV1_2               ProfileName = 0x00000012
	ProfileNameAsymmetricKeyLifecycleClientKMIPV1_0              ProfileName = 0x00000013
	ProfileNameAsymmetricKeyLifecycleClientKMIPV1_1              ProfileName = 0x00000014
	ProfileNameAsymmetricKeyLifecycleClientKMIPV1_2              ProfileName = 0x00000015
	ProfileNameAsymmetricKeyLifecycleServerKMIPV1_0              ProfileName = 0x00000016
	ProfileNameAsymmetricKeyLifecycleServerKMIPV1_1              ProfileName = 0x00000017
	ProfileNameAsymmetricKeyLifecycleServerKMIPV1_2              ProfileName = 0x00000018
	ProfileNameBasicCryptographicClientKMIPV1_2                  ProfileName = 0x00000019
	ProfileNameBasicCryptographicServerKMIPV1_2                  ProfileName = 0x0000001a
	ProfileNameAdvancedCryptographicClientKMIPV1_2               ProfileName = 0x0000001b
	ProfileNameAdvancedCryptographicServerKMIPV1_2               ProfileName = 0x0000001c
	ProfileNameRNGCryptographicClientKMIPV1_2                    ProfileName = 0x0000001d
	ProfileNameRNGCryptographicServerKMIPV1_2                    ProfileName = 0x0000001e
	ProfileNameBasicSymmetricKeyFoundryClientKMIPV1_0            ProfileName = 0x0000001f
	ProfileNameIntermediateSymmetricKeyFoundryClientKMIPV1_0     ProfileName = 0x00000020
	ProfileNameAdvancedSymmetricKeyFoundryClientKMIPV1_0         ProfileName = 0x00000021
	ProfileNameBasicSymmetricKeyFoundryClientKMIPV1_1            ProfileName = 0x00000022
	ProfileNameIntermediateSymmetricKeyFoundryClientKMIPV1_1     ProfileName = 0x00000023
	ProfileNameAdvancedSymmetricKeyFoundryClientKMIPV1_1         ProfileName = 0x00000024
	ProfileNameBasicSymmetricKeyFoundryClientKMIPV1_2            ProfileName = 0x00000025
	ProfileNameIntermediateSymmetricKeyFoundryClientKMIPV1_2     ProfileName = 0x00000026
	ProfileNameAdvancedSymmetricKeyFoundryClientKMIPV1_2         ProfileName = 0x00000027
	ProfileNameSymmetricKeyFoundryServerKMIPV1_0                 ProfileName = 0x00000028
	ProfileNameSymmetricKeyFoundryServerKMIPV1_1                 ProfileName = 0x00000029
	ProfileNameSymmetricKeyFoundryServerKMIPV1_2                 ProfileName = 0x0000002a
	ProfileNameOpaqueManagedObjectStoreClientKMIPV1_0            ProfileName = 0x0000002b
	ProfileNameOpaqueManagedObjectStoreClientKMIPV1_1            ProfileName = 0x0000002c
	ProfileNameOpaqueManagedObjectStoreClientKMIPV1_2            ProfileName = 0x0000002d
	ProfileNameOpaqueManagedObjectStoreServerKMIPV1_0            ProfileName = 0x0000002e
	ProfileNameOpaqueManagedObjectStoreServerKMIPV1_1            ProfileName = 0x0000002f
	ProfileNameOpaqueManagedObjectStoreServerKMIPV1_2            ProfileName = 0x00000030
	ProfileNameSuiteBMinLOS_128ClientKMIPV1_0                    ProfileName = 0x00000031
	ProfileNameSuiteBMinLOS_128ClientKMIPV1_1                    ProfileName = 0x00000032
	ProfileNameSuiteBMinLOS_128ClientKMIPV1_2                    ProfileName = 0x00000033
	ProfileNameSuiteBMinLOS_128ServerKMIPV1_0                    ProfileName = 0x00000034
	ProfileNameSuiteBMinLOS_128ServerKMIPV1_1                    ProfileName = 0x00000035
	ProfileNameSuiteBMinLOS_128ServerKMIPV1_2                    ProfileName = 0x00000036
	ProfileNameSuiteBMinLOS_192ClientKMIPV1_0                    ProfileName = 0x00000037
	ProfileNameSuiteBMinLOS_192ClientKMIPV1_1                    ProfileName = 0x00000038
	ProfileNameSuiteBMinLOS_192ClientKMIPV1_2                    ProfileName = 0x00000039
	ProfileNameSuiteBMinLOS_192ServerKMIPV1_0                    ProfileName = 0x0000003a
	ProfileNameSuiteBMinLOS_192ServerKMIPV1_1                    ProfileName = 0x0000003b
	ProfileNameSuiteBMinLOS_192ServerKMIPV1_2                    ProfileName = 0x0000003c
	ProfileNameStorageArrayWithSelfEncryptingDriveClientKMIPV1_0 ProfileName = 0x0000003d
	ProfileNameStorageArrayWithSelfEncryptingDriveClientKMIPV1_1 ProfileName = 0x0000003e
	ProfileNameStorageArrayWithSelfEncryptingDriveClientKMIPV1_2 ProfileName = 0x0000003f
	ProfileNameStorageArrayWithSelfEncryptingDriveServerKMIPV1_0 ProfileName = 0x00000040
	ProfileNameStorageArrayWithSelfEncryptingDriveServerKMIPV1_1 ProfileName = 0x00000041
	ProfileNameStorageArrayWithSelfEncryptingDriveServerKMIPV1_2 ProfileName = 0x00000042
	ProfileNameHTTPSClientKMIPV1_0                               ProfileName = 0x00000043
	ProfileNameHTTPSClientKMIPV1_1                               ProfileName = 0x00000044
	ProfileNameHTTPSClientKMIPV1_2                               ProfileName = 0x00000045
	ProfileNameHTTPSServerKMIPV1_0                               ProfileName = 0x00000046
	ProfileNameHTTPSServerKMIPV1_1                               ProfileName = 0x00000047
	ProfileNameHTTPSServerKMIPV1_2                               ProfileName = 0x00000048
	ProfileNameJSONClientKMIPV1_0                                ProfileName = 0x00000049
	ProfileNameJSONClientKMIPV1_1                                ProfileName = 0x0000004a
	ProfileNameJSONClientKMIPV1_2                                ProfileName = 0x0000004b
	ProfileNameJSONServerKMIPV1_0                                ProfileName = 0x0000004c
	ProfileNameJSONServerKMIPV1_1                                ProfileName = 0x0000004d
	ProfileNameJSONServerKMIPV1_2                                ProfileName = 0x0000004e
	ProfileNameXMLClientKMIPV1_0                                 ProfileName = 0x0000004f
	ProfileNameXMLClientKMIPV1_1                                 ProfileName = 0x00000050
	ProfileNameXMLClientKMIPV1_2                                 ProfileName = 0x00000051
	ProfileNameXMLServerKMIPV1_0                                 ProfileName = 0x00000052
	ProfileNameXMLServerKMIPV1_1                                 ProfileName = 0x00000053
	ProfileNameXMLServerKMIPV1_2                                 ProfileName = 0x00000054
	ProfileNameBaselineServerBasicKMIPV1_3                       ProfileName = 0x00000055
	ProfileNameBaselineServerTLSV1_2KMIPV1_3                     ProfileName = 0x00000056
	ProfileNameBaselineClientBasicKMIPV1_3                       ProfileName = 0x00000057
	ProfileNameBaselineClientTLSV1_2KMIPV1_3                     ProfileName = 0x00000058
	ProfileNameCompleteServerBasicKMIPV1_3                       ProfileName = 0x00000059
	ProfileNameCompleteServerTLSV1_2KMIPV1_3                     ProfileName = 0x0000005a
	ProfileNameTapeLibraryClientKMIPV1_3                         ProfileName = 0x0000005b
	ProfileNameTapeLibraryServerKMIPV1_3                         ProfileName = 0x0000005c
	ProfileNameSymmetricKeyLifecycleClientKMIPV1_3               ProfileName = 0x0000005d
	ProfileNameSymmetricKeyLifecycleServerKMIPV1_3               ProfileName = 0x0000005e
	ProfileNameAsymmetricKeyLifecycleClientKMIPV1_3              ProfileName = 0x0000005f
	ProfileNameAsymmetricKeyLifecycleServerKMIPV1_3              ProfileName = 0x00000060
	ProfileNameBasicCryptographicClientKMIPV1_3                  ProfileName = 0x00000061
	ProfileNameBasicCryptographicServerKMIPV1_3                  ProfileName = 0x00000062
	ProfileNameAdvancedCryptographicClientKMIPV1_3               ProfileName = 0x00000063
	ProfileNameAdvancedCryptographicServerKMIPV1_3               ProfileName = 0x00000064
	ProfileNameRNGCryptographicClientKMIPV1_3                    ProfileName = 0x00000065
	ProfileNameRNGCryptographicServerKMIPV1_3                    ProfileName = 0x00000066
	ProfileNameBasicSymmetricKeyFoundryClientKMIPV1_3            ProfileName = 0x00000067
	ProfileNameIntermediateSymmetricKeyFoundryClientKMIPV1_3     ProfileName = 0x00000068
	ProfileNameAdvancedSymmetricKeyFoundryClientKMIPV1_3         ProfileName = 0x00000069
	ProfileNameSymmetricKeyFoundryServerKMIPV1_3                 ProfileName = 0x0000006a
	ProfileNameOpaqueManagedObjectStoreClientKMIPV1_3            ProfileName = 0x0000006b
	ProfileNameOpaqueManagedObjectStoreServerKMIPV1_3            ProfileName = 0x0000006c
	ProfileNameSuiteBMinLOS_128ClientKMIPV1_3                    ProfileName = 0x0000006d
	ProfileNameSuiteBMinLOS_128ServerKMIPV1_3                    ProfileName = 0x0000006e
	ProfileNameSuiteBMinLOS_192ClientKMIPV1_3                    ProfileName = 0x0000006f
	ProfileNameSuiteBMinLOS_192ServerKMIPV1_3                    ProfileName = 0x00000070
	ProfileNameStorageArrayWithSelfEncryptingDriveClientKMIPV1_3 ProfileName = 0x00000071
	ProfileNameStorageArrayWithSelfEncryptingDriveServerKMIPV1_3 ProfileName = 0x00000072
	ProfileNameHTTPSClientKMIPV1_3                               ProfileName = 0x00000073
	ProfileNameHTTPSServerKMIPV1_3                               ProfileName = 0x00000074
	ProfileNameJSONClientKMIPV1_3                                ProfileName = 0x00000075
	ProfileNameJSONServerKMIPV1_3                                ProfileName = 0x00000076
	ProfileNameXMLClientKMIPV1_3                                 ProfileName = 0x00000077
	ProfileNameXMLServerKMIPV1_3                                 ProfileName = 0x00000078
	ProfileNameBaselineServerBasicKMIPV1_4                       ProfileName = 0x00000079
	ProfileNameBaselineServerTLSV1_2KMIPV1_4                     ProfileName = 0x0000007a
	ProfileNameBaselineClientBasicKMIPV1_4                       ProfileName = 0x0000007b
	ProfileNameBaselineClientTLSV1_2KMIPV1_4                     ProfileName = 0x0000007c
	ProfileNameCompleteServerBasicKMIPV1_4                       ProfileName = 0x0000007d
	ProfileNameCompleteServerTLSV1_2KMIPV1_4                     ProfileName = 0x0000007e
	ProfileNameTapeLibraryClientKMIPV1_4                         ProfileName = 0x0000007f
	ProfileNameTapeLibraryServerKMIPV1_4                         ProfileName = 0x00000080
	ProfileNameSymmetricKeyLifecycleClientKMIPV1_4               ProfileName = 0x00000081
	ProfileNameSymmetricKeyLifecycleServerKMIPV1_4               ProfileName = 0x00000082
	ProfileNameAsymmetricKeyLifecycleClientKMIPV1_4              ProfileName = 0x00000083
	ProfileNameAsymmetricKeyLifecycleServerKMIPV1_4              ProfileName = 0x00000084
	ProfileNameBasicCryptographicClientKMIPV1_4                  ProfileName = 0x00000085
	ProfileNameBasicCryptographicServerKMIPV1_4                  ProfileName = 0x00000086
	ProfileNameAdvancedCryptographicClientKMIPV1_4               ProfileName = 0x00000087
	ProfileNameAdvancedCryptographicServerKMIPV1_4               ProfileName = 0x00000088
	ProfileNameRNGCryptographicClientKMIPV1_4                    ProfileName = 0x00000089
	ProfileNameRNGCryptographicServerKMIPV1_4                    ProfileName = 0x0000008a
	ProfileNameBasicSymmetricKeyFoundryClientKMIPV1_4            ProfileName = 0x0000008b
	ProfileNameIntermediateSymmetricKeyFoundryClientKMIPV1_4     ProfileName = 0x0000008c
	ProfileNameAdvancedSymmetricKeyFoundryClientKMIPV1_4         ProfileName = 0x0000008d
	ProfileNameSymmetricKeyFoundryServerKMIPV1_4                 ProfileName = 0x0000008e
	ProfileNameOpaqueManagedObjectStoreClientKMIPV1_4            ProfileName = 0x0000008f
	ProfileNameOpaqueManagedObjectStoreServerKMIPV1_4            ProfileName = 0x00000090
	ProfileNameSuiteBMinLOS_128ClientKMIPV1_4                    ProfileName = 0x00000091
	ProfileNameSuiteBMinLOS_128ServerKMIPV1_4                    ProfileName = 0x00000092
	ProfileNameSuiteBMinLOS_192ClientKMIPV1_4                    ProfileName = 0x00000093
	ProfileNameSuiteBMinLOS_192ServerKMIPV1_4                    ProfileName = 0x00000094
	ProfileNameStorageArrayWithSelfEncryptingDriveClientKMIPV1_4 ProfileName = 0x00000095
	ProfileNameStorageArrayWithSelfEncryptingDriveServerKMIPV1_4 ProfileName = 0x00000096
	ProfileNameHTTPSClientKMIPV1_4                               ProfileName = 0x00000097
	ProfileNameHTTPSServerKMIPV1_4                               ProfileName = 0x00000098
	ProfileNameJSONClientKMIPV1_4                                ProfileName = 0x00000099
	ProfileNameJSONServerKMIPV1_4                                ProfileName = 0x0000009a
	ProfileNameXMLClientKMIPV1_4                                 ProfileName = 0x0000009b
	ProfileNameXMLServerKMIPV1_4                                 ProfileName = 0x0000009c
)

func (ProfileName) MarshalTTLV

func (p ProfileName) MarshalTTLV(enc *Encoder, tag Tag) error

func (ProfileName) MarshalText

func (p ProfileName) MarshalText() (text []byte, err error)

func (ProfileName) String

func (p ProfileName) String() string

type PutFunction

type PutFunction uint32

9.1.3.2.26 Table 314

const (
	PutFunctionNew     PutFunction = 0x00000001
	PutFunctionReplace PutFunction = 0x00000002
)

func (PutFunction) MarshalTTLV

func (p PutFunction) MarshalTTLV(enc *Encoder, tag Tag) error

func (PutFunction) MarshalText

func (p PutFunction) MarshalText() (text []byte, err error)

func (PutFunction) String

func (p PutFunction) String() string

type QueryFunction

type QueryFunction uint32

9.1.3.2.24 Table 312

const (
	QueryFunctionQueryOperations                QueryFunction = 0x00000001
	QueryFunctionQueryObjects                   QueryFunction = 0x00000002
	QueryFunctionQueryServerInformation         QueryFunction = 0x00000003
	QueryFunctionQueryApplicationNamespaces     QueryFunction = 0x00000004
	QueryFunctionQueryExtensionList             QueryFunction = 0x00000005
	QueryFunctionQueryExtensionMap              QueryFunction = 0x00000006
	QueryFunctionQueryAttestationTypes          QueryFunction = 0x00000007
	QueryFunctionQueryRNGs                      QueryFunction = 0x00000008
	QueryFunctionQueryValidations               QueryFunction = 0x00000009
	QueryFunctionQueryProfiles                  QueryFunction = 0x0000000a
	QueryFunctionQueryCapabilities              QueryFunction = 0x0000000b
	QueryFunctionQueryClientRegistrationMethods QueryFunction = 0x0000000c
)

func (QueryFunction) MarshalTTLV

func (q QueryFunction) MarshalTTLV(enc *Encoder, tag Tag) error

func (QueryFunction) MarshalText

func (q QueryFunction) MarshalText() (text []byte, err error)

func (QueryFunction) String

func (q QueryFunction) String() string

type RNGAlgorithm

type RNGAlgorithm uint32

9.1.3.2.37 Table

const (
	RNGAlgorithmUnspecified RNGAlgorithm = 0x00000001
	RNGAlgorithmFIPS186_2   RNGAlgorithm = 0x00000002
	RNGAlgorithmDRBG        RNGAlgorithm = 0x00000003
	RNGAlgorithmNRBG        RNGAlgorithm = 0x00000004
	RNGAlgorithmANSIX9_31   RNGAlgorithm = 0x00000005
	RNGAlgorithmANSIX9_62   RNGAlgorithm = 0x00000006
)

func (RNGAlgorithm) MarshalTTLV

func (r RNGAlgorithm) MarshalTTLV(enc *Encoder, tag Tag) error

func (RNGAlgorithm) MarshalText

func (r RNGAlgorithm) MarshalText() (text []byte, err error)

func (RNGAlgorithm) String

func (r RNGAlgorithm) String() string

type RNGMode

type RNGMode uint32

9.1.3.2.46

const (
	RNGModeUnspecified            RNGMode = 0x00000001
	RNGModeSharedInstantiation    RNGMode = 0x00000002
	RNGModeNonSharedInstantiation RNGMode = 0x00000003
)

func (RNGMode) MarshalTTLV

func (r RNGMode) MarshalTTLV(enc *Encoder, tag Tag) error

func (RNGMode) MarshalText

func (r RNGMode) MarshalText() (text []byte, err error)

func (RNGMode) String

func (r RNGMode) String() string

type RecommendedCurve

type RecommendedCurve uint32

9.1.3.2.5 Table 293

const (
	RecommendedCurveP_192            RecommendedCurve = 0x00000001
	RecommendedCurveK_163            RecommendedCurve = 0x00000002
	RecommendedCurveB_163            RecommendedCurve = 0x00000003
	RecommendedCurveP_224            RecommendedCurve = 0x00000004
	RecommendedCurveK_233            RecommendedCurve = 0x00000005
	RecommendedCurveB_233            RecommendedCurve = 0x00000006
	RecommendedCurveP_256            RecommendedCurve = 0x00000007
	RecommendedCurveK_283            RecommendedCurve = 0x00000008
	RecommendedCurveB_283            RecommendedCurve = 0x00000009
	RecommendedCurveP_384            RecommendedCurve = 0x0000000a
	RecommendedCurveK_409            RecommendedCurve = 0x0000000b
	RecommendedCurveB_409            RecommendedCurve = 0x0000000c
	RecommendedCurveP_521            RecommendedCurve = 0x0000000d
	RecommendedCurveK_571            RecommendedCurve = 0x0000000e
	RecommendedCurveB_571            RecommendedCurve = 0x0000000f
	RecommendedCurveSECP112R1        RecommendedCurve = 0x00000010
	RecommendedCurveSECP112R2        RecommendedCurve = 0x00000011
	RecommendedCurveSECP128R1        RecommendedCurve = 0x00000012
	RecommendedCurveSECP128R2        RecommendedCurve = 0x00000013
	RecommendedCurveSECP160K1        RecommendedCurve = 0x00000014
	RecommendedCurveSECP160R1        RecommendedCurve = 0x00000015
	RecommendedCurveSECP160R2        RecommendedCurve = 0x00000016
	RecommendedCurveSECP192K1        RecommendedCurve = 0x00000017
	RecommendedCurveSECP224K1        RecommendedCurve = 0x00000018
	RecommendedCurveSECP256K1        RecommendedCurve = 0x00000019
	RecommendedCurveSECT113R1        RecommendedCurve = 0x0000001a
	RecommendedCurveSECT113R2        RecommendedCurve = 0x0000001b
	RecommendedCurveSECT131R1        RecommendedCurve = 0x0000001c
	RecommendedCurveSECT131R2        RecommendedCurve = 0x0000001d
	RecommendedCurveSECT163R1        RecommendedCurve = 0x0000001e
	RecommendedCurveSECT193R1        RecommendedCurve = 0x0000001f
	RecommendedCurveSECT193R2        RecommendedCurve = 0x00000020
	RecommendedCurveSECT239K1        RecommendedCurve = 0x00000021
	RecommendedCurveANSIX9P192V2     RecommendedCurve = 0x00000022
	RecommendedCurveANSIX9P192V3     RecommendedCurve = 0x00000023
	RecommendedCurveANSIX9P239V1     RecommendedCurve = 0x00000024
	RecommendedCurveANSIX9P239V2     RecommendedCurve = 0x00000025
	RecommendedCurveANSIX9P239V3     RecommendedCurve = 0x00000026
	RecommendedCurveANSIX9C2PNB163V1 RecommendedCurve = 0x00000027
	RecommendedCurveANSIX9C2PNB163V2 RecommendedCurve = 0x00000028
	RecommendedCurveANSIX9C2PNB163V3 RecommendedCurve = 0x00000029
	RecommendedCurveANSIX9C2PNB176V1 RecommendedCurve = 0x0000002a
	RecommendedCurveANSIX9C2TNB191V1 RecommendedCurve = 0x0000002b
	RecommendedCurveANSIX9C2TNB191V2 RecommendedCurve = 0x0000002c
	RecommendedCurveANSIX9C2TNB191V3 RecommendedCurve = 0x0000002d
	RecommendedCurveANSIX9C2PNB208W1 RecommendedCurve = 0x0000002e
	RecommendedCurveANSIX9C2TNB239V1 RecommendedCurve = 0x0000002f
	RecommendedCurveANSIX9C2TNB239V2 RecommendedCurve = 0x00000030
	RecommendedCurveANSIX9C2TNB239V3 RecommendedCurve = 0x00000031
	RecommendedCurveANSIX9C2PNB272W1 RecommendedCurve = 0x00000032
	RecommendedCurveANSIX9C2PNB304W1 RecommendedCurve = 0x00000033
	RecommendedCurveANSIX9C2TNB359V1 RecommendedCurve = 0x00000034
	RecommendedCurveANSIX9C2PNB368W1 RecommendedCurve = 0x00000035
	RecommendedCurveANSIX9C2TNB431R1 RecommendedCurve = 0x00000036
	RecommendedCurveBRAINPOOLP160R1  RecommendedCurve = 0x00000037
	RecommendedCurveBRAINPOOLP160T1  RecommendedCurve = 0x00000038
	RecommendedCurveBRAINPOOLP192R1  RecommendedCurve = 0x00000039
	RecommendedCurveBRAINPOOLP192T1  RecommendedCurve = 0x0000003a
	RecommendedCurveBRAINPOOLP224R1  RecommendedCurve = 0x0000003b
	RecommendedCurveBRAINPOOLP224T1  RecommendedCurve = 0x0000003c
	RecommendedCurveBRAINPOOLP256R1  RecommendedCurve = 0x0000003d
	RecommendedCurveBRAINPOOLP256T1  RecommendedCurve = 0x0000003e
	RecommendedCurveBRAINPOOLP320R1  RecommendedCurve = 0x0000003f
	RecommendedCurveBRAINPOOLP320T1  RecommendedCurve = 0x00000040
	RecommendedCurveBRAINPOOLP384R1  RecommendedCurve = 0x00000041
	RecommendedCurveBRAINPOOLP384T1  RecommendedCurve = 0x00000042
	RecommendedCurveBRAINPOOLP512R1  RecommendedCurve = 0x00000043
	RecommendedCurveBRAINPOOLP512T1  RecommendedCurve = 0x00000044
)

func (RecommendedCurve) MarshalTTLV

func (r RecommendedCurve) MarshalTTLV(enc *Encoder, tag Tag) error

func (RecommendedCurve) MarshalText

func (r RecommendedCurve) MarshalText() (text []byte, err error)

func (RecommendedCurve) String

func (r RecommendedCurve) String() string

type ResultReason

type ResultReason uint32

9.1.3.2.29 Table 317

const (
	ResultReasonItemNotFound                     ResultReason = 0x00000001
	ResultReasonResponseTooLarge                 ResultReason = 0x00000002
	ResultReasonAuthenticationNotSuccessful      ResultReason = 0x00000003
	ResultReasonInvalidMessage                   ResultReason = 0x00000004
	ResultReasonOperationNotSupported            ResultReason = 0x00000005
	ResultReasonMissingData                      ResultReason = 0x00000006
	ResultReasonInvalidField                     ResultReason = 0x00000007
	ResultReasonFeatureNotSupported              ResultReason = 0x00000008
	ResultReasonOperationCanceledByRequester     ResultReason = 0x00000009
	ResultReasonCryptographicFailure             ResultReason = 0x0000000a
	ResultReasonIllegalOperation                 ResultReason = 0x0000000b
	ResultReasonPermissionDenied                 ResultReason = 0x0000000c
	ResultReasonObjectArchived                   ResultReason = 0x0000000d
	ResultReasonIndexOutOfBounds                 ResultReason = 0x0000000e
	ResultReasonApplicationNamespaceNotSupported ResultReason = 0x0000000f
	ResultReasonKeyFormatTypeNotSupported        ResultReason = 0x00000010
	ResultReasonKeyCompressionTypeNotSupported   ResultReason = 0x00000011
	ResultReasonEncodingOptionError              ResultReason = 0x00000012
	ResultReasonKeyValueNotPresent               ResultReason = 0x00000013
	ResultReasonAttestationRequired              ResultReason = 0x00000014
	ResultReasonAttestationFailed                ResultReason = 0x00000015
	ResultReasonSensitive                        ResultReason = 0x00000016
	ResultReasonNotExtractable                   ResultReason = 0x00000017
	ResultReasonObjectAlreadyExists              ResultReason = 0x00000018
	ResultReasonGeneralFailure                   ResultReason = 0x00000100
)

func (ResultReason) MarshalTTLV

func (r ResultReason) MarshalTTLV(enc *Encoder, tag Tag) error

func (ResultReason) MarshalText

func (r ResultReason) MarshalText() (text []byte, err error)

func (ResultReason) String

func (r ResultReason) String() string

type ResultStatus

type ResultStatus uint32

9.1.3.2.28 Table 316

const (
	ResultStatusSuccess          ResultStatus = 0x00000000
	ResultStatusOperationFailed  ResultStatus = 0x00000001
	ResultStatusOperationPending ResultStatus = 0x00000002
	ResultStatusOperationUndone  ResultStatus = 0x00000003
)

func (ResultStatus) MarshalTTLV

func (r ResultStatus) MarshalTTLV(enc *Encoder, tag Tag) error

func (ResultStatus) MarshalText

func (r ResultStatus) MarshalText() (text []byte, err error)

func (ResultStatus) String

func (r ResultStatus) String() string

type RevocationReasonCode

type RevocationReasonCode uint32

9.1.3.2.19 Table 307

const (
	RevocationReasonCodeUnspecified          RevocationReasonCode = 0x00000001
	RevocationReasonCodeKeyCompromise        RevocationReasonCode = 0x00000002
	RevocationReasonCodeCACompromise         RevocationReasonCode = 0x00000003
	RevocationReasonCodeAffiliationChanged   RevocationReasonCode = 0x00000004
	RevocationReasonCodeSuperseded           RevocationReasonCode = 0x00000005
	RevocationReasonCodeCessationOfOperation RevocationReasonCode = 0x00000006
	RevocationReasonCodePrivilegeWithdrawn   RevocationReasonCode = 0x00000007
)

func (RevocationReasonCode) MarshalTTLV

func (r RevocationReasonCode) MarshalTTLV(enc *Encoder, tag Tag) error

func (RevocationReasonCode) MarshalText

func (r RevocationReasonCode) MarshalText() (text []byte, err error)

func (RevocationReasonCode) String

func (r RevocationReasonCode) String() string

type SecretDataType

type SecretDataType uint32

9.1.3.2.9 Table 9

const (
	SecretDataTypePassword SecretDataType = 0x00000001
	SecretDataTypeSeed     SecretDataType = 0x00000002
)

func (SecretDataType) MarshalTTLV

func (s SecretDataType) MarshalTTLV(enc *Encoder, tag Tag) error

func (SecretDataType) MarshalText

func (s SecretDataType) MarshalText() (text []byte, err error)

func (SecretDataType) String

func (s SecretDataType) String() string

type ShreddingAlgorithm

type ShreddingAlgorithm uint32

9.1.3.2.45

const (
	ShreddingAlgorithmUnspecified   ShreddingAlgorithm = 0x00000001
	ShreddingAlgorithmCryptographic ShreddingAlgorithm = 0x00000002
	ShreddingAlgorithmUnsupported   ShreddingAlgorithm = 0x00000003
)

func (ShreddingAlgorithm) MarshalTTLV

func (s ShreddingAlgorithm) MarshalTTLV(enc *Encoder, tag Tag) error

func (ShreddingAlgorithm) MarshalText

func (s ShreddingAlgorithm) MarshalText() (text []byte, err error)

func (ShreddingAlgorithm) String

func (s ShreddingAlgorithm) String() string

type SplitKeyMethod

type SplitKeyMethod uint32

9.1.3.2.8 Table 296

const (
	SplitKeyMethodXOR                         SplitKeyMethod = 0x00000001
	SplitKeyMethodPolynomialSharingGF2_16     SplitKeyMethod = 0x00000002
	SplitKeyMethodPolynomialSharingPrimeField SplitKeyMethod = 0x00000003
	SplitKeyMethodPolynomialSharingGF2_8      SplitKeyMethod = 0x00000004
)

func (SplitKeyMethod) MarshalTTLV

func (s SplitKeyMethod) MarshalTTLV(enc *Encoder, tag Tag) error

func (SplitKeyMethod) MarshalText

func (s SplitKeyMethod) MarshalText() (text []byte, err error)

func (SplitKeyMethod) String

func (s SplitKeyMethod) String() string

type State

type State uint32

9.1.3.2.18 Table 306

const (
	StatePreActive            State = 0x00000001
	StateActive               State = 0x00000002
	StateDeactivated          State = 0x00000003
	StateCompromised          State = 0x00000004
	StateDestroyed            State = 0x00000005
	StateDestroyedCompromised State = 0x00000006
)

func (State) MarshalTTLV

func (s State) MarshalTTLV(enc *Encoder, tag Tag) error

func (State) MarshalText

func (s State) MarshalText() (text []byte, err error)

func (State) String

func (s State) String() string

type StorageStatusMask

type StorageStatusMask uint32

9.1.3.3.2

const (
	StorageStatusMaskOnLineStorage   StorageStatusMask = 0x00000001
	StorageStatusMaskArchivalStorage StorageStatusMask = 0x00000002
)

func (StorageStatusMask) MarshalText

func (s StorageStatusMask) MarshalText() (text []byte, err error)

func (StorageStatusMask) String

func (s StorageStatusMask) String() string

type TTLV

type TTLV []byte

func (TTLV) FullLen

func (t TTLV) FullLen() int

func (TTLV) Len

func (t TTLV) Len() int

func (TTLV) MarshalJSON

func (t TTLV) MarshalJSON() ([]byte, error)

func (TTLV) MarshalXML

func (t TTLV) MarshalXML(e *xml.Encoder, start xml.StartElement) error

func (TTLV) Next

func (t TTLV) Next() TTLV

func (TTLV) String

func (t TTLV) String() string

func (TTLV) Tag

func (t TTLV) Tag() Tag

func (TTLV) Type

func (t TTLV) Type() Type

func (*TTLV) UnmarshalJSON

func (t *TTLV) UnmarshalJSON(b []byte) error

func (*TTLV) UnmarshalTTLV

func (t *TTLV) UnmarshalTTLV(d *Decoder, ttlv TTLV) error

func (*TTLV) UnmarshalXML

func (t *TTLV) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

func (TTLV) Valid

func (t TTLV) Valid() error

func (TTLV) ValidHeader

func (t TTLV) ValidHeader() error

func (TTLV) Value

func (t TTLV) Value() interface{}

func (TTLV) ValueBigInteger

func (t TTLV) ValueBigInteger() *big.Int

func (TTLV) ValueBoolean

func (t TTLV) ValueBoolean() bool

func (TTLV) ValueByteString

func (t TTLV) ValueByteString() []byte

func (TTLV) ValueDateTime

func (t TTLV) ValueDateTime() time.Time

func (TTLV) ValueEnumeration

func (t TTLV) ValueEnumeration() uint32

func (TTLV) ValueInteger

func (t TTLV) ValueInteger() int

func (TTLV) ValueInterval

func (t TTLV) ValueInterval() time.Duration

func (TTLV) ValueLongInteger

func (t TTLV) ValueLongInteger() int64

func (TTLV) ValueRaw

func (t TTLV) ValueRaw() []byte

ValueRaw returns the raw bytes of the value segment of the TTLV. It relies on the length segment of the TTLV to know how many bytes to read. If the length segment's value is greater than the length of the TTLV slice, all the remaining bytes in the slice will be returned, but it will not panic.

func (TTLV) ValueStructure

func (t TTLV) ValueStructure() TTLV

func (TTLV) ValueTextString

func (t TTLV) ValueTextString() string

type Tag

type Tag uint32

Tag 9.1.3.1

const (
	TagNone                                  Tag = 0x000000
	TagActivationDate                        Tag = 0x420001
	TagApplicationData                       Tag = 0x420002
	TagApplicationNamespace                  Tag = 0x420003
	TagApplicationSpecificInformation        Tag = 0x420004
	TagArchiveDate                           Tag = 0x420005
	TagAsynchronousCorrelationValue          Tag = 0x420006
	TagAsynchronousIndicator                 Tag = 0x420007
	TagAttribute                             Tag = 0x420008
	TagAttributeIndex                        Tag = 0x420009
	TagAttributeName                         Tag = 0x42000a
	TagAttributeValue                        Tag = 0x42000b
	TagAuthentication                        Tag = 0x42000c
	TagBatchCount                            Tag = 0x42000d
	TagBatchErrorContinuationOption          Tag = 0x42000e
	TagBatchItem                             Tag = 0x42000f
	TagBatchOrderOption                      Tag = 0x420010
	TagBlockCipherMode                       Tag = 0x420011
	TagCancellationResult                    Tag = 0x420012
	TagCertificate                           Tag = 0x420013
	TagCertificateIdentifier                 Tag = 0x420014
	TagCertificateIssuer                     Tag = 0x420015
	TagCertificateIssuerAlternativeName      Tag = 0x420016
	TagCertificateIssuerDistinguishedName    Tag = 0x420017
	TagCertificateRequest                    Tag = 0x420018
	TagCertificateRequestType                Tag = 0x420019
	TagCertificateSubject                    Tag = 0x42001a
	TagCertificateSubjectAlternativeName     Tag = 0x42001b
	TagCertificateSubjectDistinguishedName   Tag = 0x42001c
	TagCertificateType                       Tag = 0x42001d
	TagCertificateValue                      Tag = 0x42001e
	TagCommonTemplateAttribute               Tag = 0x42001f
	TagCompromiseDate                        Tag = 0x420020
	TagCompromiseOccurrenceDate              Tag = 0x420021
	TagContactInformation                    Tag = 0x420022
	TagCredential                            Tag = 0x420023
	TagCredentialType                        Tag = 0x420024
	TagCredentialValue                       Tag = 0x420025
	TagCriticalityIndicator                  Tag = 0x420026
	TagCRTCoefficient                        Tag = 0x420027
	TagCryptographicAlgorithm                Tag = 0x420028
	TagCryptographicDomainParameters         Tag = 0x420029
	TagCryptographicLength                   Tag = 0x42002a
	TagCryptographicParameters               Tag = 0x42002b
	TagCryptographicUsageMask                Tag = 0x42002c
	TagCustomAttribute                       Tag = 0x42002d
	TagD                                     Tag = 0x42002e
	TagDeactivationDate                      Tag = 0x42002f
	TagDerivationData                        Tag = 0x420030
	TagDerivationMethod                      Tag = 0x420031
	TagDerivationParameters                  Tag = 0x420032
	TagDestroyDate                           Tag = 0x420033
	TagDigest                                Tag = 0x420034
	TagDigestValue                           Tag = 0x420035
	TagEncryptionKeyInformation              Tag = 0x420036
	TagG                                     Tag = 0x420037
	TagHashingAlgorithm                      Tag = 0x420038
	TagInitialDate                           Tag = 0x420039
	TagInitializationVector                  Tag = 0x42003a
	TagIssuer                                Tag = 0x42003b
	TagIterationCount                        Tag = 0x42003c
	TagIVCounterNonce                        Tag = 0x42003d
	TagJ                                     Tag = 0x42003e
	TagKey                                   Tag = 0x42003f
	TagKeyBlock                              Tag = 0x420040
	TagKeyCompressionType                    Tag = 0x420041
	TagKeyFormatType                         Tag = 0x420042
	TagKeyMaterial                           Tag = 0x420043
	TagKeyPartIdentifier                     Tag = 0x420044
	TagKeyValue                              Tag = 0x420045
	TagKeyWrappingData                       Tag = 0x420046
	TagKeyWrappingSpecification              Tag = 0x420047
	TagLastChangeDate                        Tag = 0x420048
	TagLeaseTime                             Tag = 0x420049
	TagLink                                  Tag = 0x42004a
	TagLinkType                              Tag = 0x42004b
	TagLinkedObjectIdentifier                Tag = 0x42004c
	TagMACSignature                          Tag = 0x42004d
	TagMACSignatureKeyInformation            Tag = 0x42004e
	TagMaximumItems                          Tag = 0x42004f
	TagMaximumResponseSize                   Tag = 0x420050
	TagMessageExtension                      Tag = 0x420051
	TagModulus                               Tag = 0x420052
	TagName                                  Tag = 0x420053
	TagNameType                              Tag = 0x420054
	TagNameValue                             Tag = 0x420055
	TagObjectGroup                           Tag = 0x420056
	TagObjectType                            Tag = 0x420057
	TagOffset                                Tag = 0x420058
	TagOpaqueDataType                        Tag = 0x420059
	TagOpaqueDataValue                       Tag = 0x42005a
	TagOpaqueObject                          Tag = 0x42005b
	TagOperation                             Tag = 0x42005c
	TagOperationPolicyName                   Tag = 0x42005d
	TagP                                     Tag = 0x42005e
	TagPaddingMethod                         Tag = 0x42005f
	TagPrimeExponentP                        Tag = 0x420060
	TagPrimeExponentQ                        Tag = 0x420061
	TagPrimeFieldSize                        Tag = 0x420062
	TagPrivateExponent                       Tag = 0x420063
	TagPrivateKey                            Tag = 0x420064
	TagPrivateKeyTemplateAttribute           Tag = 0x420065
	TagPrivateKeyUniqueIdentifier            Tag = 0x420066
	TagProcessStartDate                      Tag = 0x420067
	TagProtectStopDate                       Tag = 0x420068
	TagProtocolVersion                       Tag = 0x420069
	TagProtocolVersionMajor                  Tag = 0x42006a
	TagProtocolVersionMinor                  Tag = 0x42006b
	TagPublicExponent                        Tag = 0x42006c
	TagPublicKey                             Tag = 0x42006d
	TagPublicKeyTemplateAttribute            Tag = 0x42006e
	TagPublicKeyUniqueIdentifier             Tag = 0x42006f
	TagPutFunction                           Tag = 0x420070
	TagQ                                     Tag = 0x420071
	TagQString                               Tag = 0x420072
	TagQlength                               Tag = 0x420073
	TagQueryFunction                         Tag = 0x420074
	TagRecommendedCurve                      Tag = 0x420075
	TagReplacedUniqueIdentifier              Tag = 0x420076
	TagRequestHeader                         Tag = 0x420077
	TagRequestMessage                        Tag = 0x420078
	TagRequestPayload                        Tag = 0x420079
	TagResponseHeader                        Tag = 0x42007a
	TagResponseMessage                       Tag = 0x42007b
	TagResponsePayload                       Tag = 0x42007c
	TagResultMessage                         Tag = 0x42007d
	TagResultReason                          Tag = 0x42007e
	TagResultStatus                          Tag = 0x42007f
	TagRevocationMessage                     Tag = 0x420080
	TagRevocationReason                      Tag = 0x420081
	TagRevocationReasonCode                  Tag = 0x420082
	TagKeyRoleType                           Tag = 0x420083
	TagSalt                                  Tag = 0x420084
	TagSecretData                            Tag = 0x420085
	TagSecretDataType                        Tag = 0x420086
	TagSerialNumber                          Tag = 0x420087
	TagServerInformation                     Tag = 0x420088
	TagSplitKey                              Tag = 0x420089
	TagSplitKeyMethod                        Tag = 0x42008a
	TagSplitKeyParts                         Tag = 0x42008b
	TagSplitKeyThreshold                     Tag = 0x42008c
	TagState                                 Tag = 0x42008d
	TagStorageStatusMask                     Tag = 0x42008e
	TagSymmetricKey                          Tag = 0x42008f
	TagTemplate                              Tag = 0x420090
	TagTemplateAttribute                     Tag = 0x420091
	TagTimeStamp                             Tag = 0x420092
	TagUniqueBatchItemID                     Tag = 0x420093
	TagUniqueIdentifier                      Tag = 0x420094
	TagUsageLimits                           Tag = 0x420095
	TagUsageLimitsCount                      Tag = 0x420096
	TagUsageLimitsTotal                      Tag = 0x420097
	TagUsageLimitsUnit                       Tag = 0x420098
	TagUsername                              Tag = 0x420099
	TagValidityDate                          Tag = 0x42009a
	TagValidityIndicator                     Tag = 0x42009b
	TagVendorExtension                       Tag = 0x42009c
	TagVendorIdentification                  Tag = 0x42009d
	TagWrappingMethod                        Tag = 0x42009e
	TagX                                     Tag = 0x42009f
	TagY                                     Tag = 0x4200a0
	TagPassword                              Tag = 0x4200a1
	TagDeviceIdentifier                      Tag = 0x4200a2
	TagEncodingOption                        Tag = 0x4200a3
	TagExtensionInformation                  Tag = 0x4200a4
	TagExtensionName                         Tag = 0x4200a5
	TagExtensionTag                          Tag = 0x4200a6
	TagExtensionType                         Tag = 0x4200a7
	TagFresh                                 Tag = 0x4200a8
	TagMachineIdentifier                     Tag = 0x4200a9
	TagMediaIdentifier                       Tag = 0x4200aa
	TagNetworkIdentifier                     Tag = 0x4200ab
	TagObjectGroupMember                     Tag = 0x4200ac
	TagCertificateLength                     Tag = 0x4200ad
	TagDigitalSignatureAlgorithm             Tag = 0x4200ae
	TagCertificateSerialNumber               Tag = 0x4200af
	TagDeviceSerialNumber                    Tag = 0x4200b0
	TagIssuerAlternativeName                 Tag = 0x4200b1
	TagIssuerDistinguishedName               Tag = 0x4200b2
	TagSubjectAlternativeName                Tag = 0x4200b3
	TagSubjectDistinguishedName              Tag = 0x4200b4
	TagX_509CertificateIdentifier            Tag = 0x4200b5
	TagX_509CertificateIssuer                Tag = 0x4200b6
	TagX_509CertificateSubject               Tag = 0x4200b7
	TagKeyValueLocation                      Tag = 0x4200b8
	TagKeyValueLocationValue                 Tag = 0x4200b9
	TagKeyValueLocationType                  Tag = 0x4200ba
	TagKeyValuePresent                       Tag = 0x4200bb
	TagOriginalCreationDate                  Tag = 0x4200bc
	TagPGPKey                                Tag = 0x4200bd
	TagPGPKeyVersion                         Tag = 0x4200be
	TagAlternativeName                       Tag = 0x4200bf
	TagAlternativeNameValue                  Tag = 0x4200c0
	TagAlternativeNameType                   Tag = 0x4200c1
	TagData                                  Tag = 0x4200c2
	TagSignatureData                         Tag = 0x4200c3
	TagDataLength                            Tag = 0x4200c4
	TagRandomIV                              Tag = 0x4200c5
	TagMACData                               Tag = 0x4200c6
	TagAttestationType                       Tag = 0x4200c7
	TagNonce                                 Tag = 0x4200c8
	TagNonceID                               Tag = 0x4200c9
	TagNonceValue                            Tag = 0x4200ca
	TagAttestationMeasurement                Tag = 0x4200cb
	TagAttestationAssertion                  Tag = 0x4200cc
	TagIVLength                              Tag = 0x4200cd
	TagTagLength                             Tag = 0x4200ce
	TagFixedFieldLength                      Tag = 0x4200cf
	TagCounterLength                         Tag = 0x4200d0
	TagInitialCounterValue                   Tag = 0x4200d1
	TagInvocationFieldLength                 Tag = 0x4200d2
	TagAttestationCapableIndicator           Tag = 0x4200d3
	TagOffsetItems                           Tag = 0x4200d4
	TagLocatedItems                          Tag = 0x4200d5
	TagCorrelationValue                      Tag = 0x4200d6
	TagInitIndicator                         Tag = 0x4200d7
	TagFinalIndicator                        Tag = 0x4200d8
	TagRNGParameters                         Tag = 0x4200d9
	TagRNGAlgorithm                          Tag = 0x4200da
	TagDRBGAlgorithm                         Tag = 0x4200db
	TagFIPS186Variation                      Tag = 0x4200dc
	TagPredictionResistance                  Tag = 0x4200dd
	TagRandomNumberGenerator                 Tag = 0x4200de
	TagValidationInformation                 Tag = 0x4200df
	TagValidationAuthorityType               Tag = 0x4200e0
	TagValidationAuthorityCountry            Tag = 0x4200e1
	TagValidationAuthorityURI                Tag = 0x4200e2
	TagValidationVersionMajor                Tag = 0x4200e3
	TagValidationVersionMinor                Tag = 0x4200e4
	TagValidationType                        Tag = 0x4200e5
	TagValidationLevel                       Tag = 0x4200e6
	TagValidationCertificateIdentifier       Tag = 0x4200e7
	TagValidationCertificateURI              Tag = 0x4200e8
	TagValidationVendorURI                   Tag = 0x4200e9
	TagValidationProfile                     Tag = 0x4200ea
	TagProfileInformation                    Tag = 0x4200eb
	TagProfileName                           Tag = 0x4200ec
	TagServerURI                             Tag = 0x4200ed
	TagServerPort                            Tag = 0x4200ee
	TagStreamingCapability                   Tag = 0x4200ef
	TagAsynchronousCapability                Tag = 0x4200f0
	TagAttestationCapability                 Tag = 0x4200f1
	TagUnwrapMode                            Tag = 0x4200f2
	TagDestroyAction                         Tag = 0x4200f3
	TagShreddingAlgorithm                    Tag = 0x4200f4
	TagRNGMode                               Tag = 0x4200f5
	TagClientRegistrationMethod              Tag = 0x4200f6
	TagCapabilityInformation                 Tag = 0x4200f7
	TagKeyWrapType                           Tag = 0x4200f8
	TagBatchUndoCapability                   Tag = 0x4200f9
	TagBatchContinueCapability               Tag = 0x4200fa
	TagPKCS_12FriendlyName                   Tag = 0x4200fb
	TagDescription                           Tag = 0x4200fc
	TagComment                               Tag = 0x4200fd
	TagAuthenticatedEncryptionAdditionalData Tag = 0x4200fe
	TagAuthenticatedEncryptionTag            Tag = 0x4200ff
	TagSaltLength                            Tag = 0x420100
	TagMaskGenerator                         Tag = 0x420101
	TagMaskGeneratorHashingAlgorithm         Tag = 0x420102
	TagPSource                               Tag = 0x420103
	TagTrailerField                          Tag = 0x420104
	TagClientCorrelationValue                Tag = 0x420105
	TagServerCorrelationValue                Tag = 0x420106
	TagDigestedData                          Tag = 0x420107
	TagCertificateSubjectCN                  Tag = 0x420108
	TagCertificateSubjectO                   Tag = 0x420109
	TagCertificateSubjectOU                  Tag = 0x42010a
	TagCertificateSubjectEmail               Tag = 0x42010b
	TagCertificateSubjectC                   Tag = 0x42010c
	TagCertificateSubjectST                  Tag = 0x42010d
	TagCertificateSubjectL                   Tag = 0x42010e
	TagCertificateSubjectUID                 Tag = 0x42010f
	TagCertificateSubjectSerialNumber        Tag = 0x420110
	TagCertificateSubjectTitle               Tag = 0x420111
	TagCertificateSubjectDC                  Tag = 0x420112
	TagCertificateSubjectDNQualifier         Tag = 0x420113
	TagCertificateIssuerCN                   Tag = 0x420114
	TagCertificateIssuerO                    Tag = 0x420115
	TagCertificateIssuerOU                   Tag = 0x420116
	TagCertificateIssuerEmail                Tag = 0x420117
	TagCertificateIssuerC                    Tag = 0x420118
	TagCertificateIssuerST                   Tag = 0x420119
	TagCertificateIssuerL                    Tag = 0x42011a
	TagCertificateIssuerUID                  Tag = 0x42011b
	TagCertificateIssuerSerialNumber         Tag = 0x42011c
	TagCertificateIssuerTitle                Tag = 0x42011d
	TagCertificateIssuerDC                   Tag = 0x42011e
	TagCertificateIssuerDNQualifier          Tag = 0x42011f
	TagSensitive                             Tag = 0x420120
	TagAlwaysSensitive                       Tag = 0x420121
	TagExtractable                           Tag = 0x420122
	TagNeverExtractable                      Tag = 0x420123
	TagReplaceExisting                       Tag = 0x420124
)

func ParseTag

func ParseTag(s string) (Tag, error)

returns TagNone if not found. returns error if s is a malformed hex string, or a hex string of incorrect length

func (Tag) FullName

func (t Tag) FullName() string

func (Tag) MarshalText

func (t Tag) MarshalText() (text []byte, err error)

func (Tag) String

func (t Tag) String() string

func (*Tag) UnmarshalText

func (t *Tag) UnmarshalText(text []byte) (err error)

type Type

type Type byte
const (
	TypeStructure        Type = 0x01
	TypeInteger          Type = 0x02
	TypeLongInteger      Type = 0x03
	TypeBigInteger       Type = 0x04
	TypeEnumeration      Type = 0x05
	TypeBoolean          Type = 0x06
	TypeTextString       Type = 0x07
	TypeByteString       Type = 0x08
	TypeDateTime         Type = 0x09
	TypeInterval         Type = 0x0A
	TypeDateTimeExtended Type = 0x0B
)

func ParseType

func ParseType(s string) (Type, error)

func (Type) MarshalText

func (t Type) MarshalText() (text []byte, err error)

func (Type) String

func (t Type) String() string

func (*Type) UnmarshalText

func (t *Type) UnmarshalText(text []byte) (err error)

type Unmarshaler

type Unmarshaler interface {
	UnmarshalTTLV(d *Decoder, ttlv TTLV) error
}

type UnmarshalerError

type UnmarshalerError struct {
	Val    reflect.Type
	Struct reflect.Type
	Field  string
	Tag    Tag
	Type   Type
}

func (*UnmarshalerError) Error

func (e *UnmarshalerError) Error() string

type UnwrapMode

type UnwrapMode uint32

9.1.3.2.43

const (
	UnwrapModeUnspecified  UnwrapMode = 0x00000001
	UnwrapModeProcessed    UnwrapMode = 0x00000002
	UnwrapModeNotProcessed UnwrapMode = 0x00000003
)

func (UnwrapMode) MarshalTTLV

func (u UnwrapMode) MarshalTTLV(enc *Encoder, tag Tag) error

func (UnwrapMode) MarshalText

func (u UnwrapMode) MarshalText() (text []byte, err error)

func (UnwrapMode) String

func (u UnwrapMode) String() string

type UsageLimitsUnit

type UsageLimitsUnit uint32

9.1.3.2.31 Table 319

const (
	UsageLimitsUnitByte   UsageLimitsUnit = 0x00000001
	UsageLimitsUnitObject UsageLimitsUnit = 0x00000002
)

func (UsageLimitsUnit) MarshalTTLV

func (u UsageLimitsUnit) MarshalTTLV(enc *Encoder, tag Tag) error

func (UsageLimitsUnit) MarshalText

func (u UsageLimitsUnit) MarshalText() (text []byte, err error)

func (UsageLimitsUnit) String

func (u UsageLimitsUnit) String() string

type ValidationAuthorityType

type ValidationAuthorityType uint32

9.1.3.2.40

const (
	ValidationAuthorityTypeUnspecified    ValidationAuthorityType = 0x00000001
	ValidationAuthorityTypeNISTCMVP       ValidationAuthorityType = 0x00000002
	ValidationAuthorityTypeCommonCriteria ValidationAuthorityType = 0x00000003
)

func (ValidationAuthorityType) MarshalTTLV

func (v ValidationAuthorityType) MarshalTTLV(enc *Encoder, tag Tag) error

func (ValidationAuthorityType) MarshalText

func (v ValidationAuthorityType) MarshalText() (text []byte, err error)

func (ValidationAuthorityType) String

func (v ValidationAuthorityType) String() string

type ValidationType

type ValidationType uint32

9.1.3.2.41

const (
	ValidationTypeUnspecified ValidationType = 0x00000001
	ValidationTypeHardware    ValidationType = 0x00000002
	ValidationTypeSoftware    ValidationType = 0x00000003
	ValidationTypeFirmware    ValidationType = 0x00000004
	ValidationTypeHybrid      ValidationType = 0x00000005
)

func (ValidationType) MarshalTTLV

func (v ValidationType) MarshalTTLV(enc *Encoder, tag Tag) error

func (ValidationType) MarshalText

func (v ValidationType) MarshalText() (text []byte, err error)

func (ValidationType) String

func (v ValidationType) String() string

type ValidityIndicator

type ValidityIndicator uint32

9.1.3.2.23 Table 311

const (
	ValidityIndicatorValid   ValidityIndicator = 0x00000001
	ValidityIndicatorInvalid ValidityIndicator = 0x00000002
	ValidityIndicatorUnknown ValidityIndicator = 0x00000003
)

func (ValidityIndicator) MarshalTTLV

func (v ValidityIndicator) MarshalTTLV(enc *Encoder, tag Tag) error

func (ValidityIndicator) MarshalText

func (v ValidityIndicator) MarshalText() (text []byte, err error)

func (ValidityIndicator) String

func (v ValidityIndicator) String() string

type Value

type Value struct {
	Tag   Tag
	Value interface{}
}

Value is a go-typed mapping for a TTLV value. It holds a tag, and the value in the form of a native go type.

Value supports marshaling and unmarshaling, allowing a mapping between encoded TTLV bytes and native go types.

TTLV Structure types are mapped to the Values go type. When marshaling, if the Value field is set to a Values{}, the resulting TTLV will be TypeStructure. When unmarshaling a TTLV with TypeStructure, the Value field will contain a Values{}.

func (Value) MarshalTTLV

func (t Value) MarshalTTLV(e *Encoder, tag Tag) error

MarshalTTLV implements Marshaler

func (*Value) UnmarshalTTLV

func (t *Value) UnmarshalTTLV(d *Decoder, ttlv TTLV) error

UnmarshalTTLV implements Unmarshaler

type Values

type Values []Value

Values is a slice of Value objects. It represents the body of a TTLV with a type of Structure.

type WrappingMethod

type WrappingMethod uint32

9.1.3.2.4 Table 292

const (
	WrappingMethodEncrypt            WrappingMethod = 0x00000001
	WrappingMethodMACSign            WrappingMethod = 0x00000002
	WrappingMethodEncryptThenMACSign WrappingMethod = 0x00000003
	WrappingMethodMACSignThenEncrypt WrappingMethod = 0x00000004
	WrappingMethodTR_31              WrappingMethod = 0x00000005
)

func (WrappingMethod) MarshalTTLV

func (w WrappingMethod) MarshalTTLV(enc *Encoder, tag Tag) error

func (WrappingMethod) MarshalText

func (w WrappingMethod) MarshalText() (text []byte, err error)

func (WrappingMethod) String

func (w WrappingMethod) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL