func (sc sealCommand) String() string {
	return fmt.Sprintf("sealCommand{KeyHandle: %x, EncAuth: % x}", sc.KeyHandle, sc.EncAuth)
}
String returns a string representation of a sealCommand.
package tpm
import (
	"bytes"
	"crypto"
	"crypto/rsa"
	"encoding/binary"
	"errors"
	"fmt"
	"io"
	"math/big"
	"github.com/google/go-tpm/tpmutil"
)
type pcrValue [20]byte
const PCRSize int = 20
type pcrMask [3]byte
type pcrSelection struct {
	Size uint16
	Mask pcrMask
}
type pcrInfoLong struct {
	Tag              uint16
	LocAtCreation    Locality
	LocAtRelease     Locality
	PCRsAtCreation   pcrSelection
	PCRsAtRelease    pcrSelection
	DigestAtCreation Digest
	DigestAtRelease  Digest
}
type pcrInfoShort struct {
	PCRsAtRelease   pcrSelection
	LocAtRelease    Locality
	DigestAtRelease Digest
}
type pcrInfo struct {
	PcrSelection     pcrSelection
	DigestAtRelease  Digest
	DigestAtCreation Digest
}
type capVersionByte byte
type capVersion struct {
	Major    capVersionByte
	Minor    capVersionByte
	RevMajor byte
	RevMinor byte
}
type CapVersionInfo struct {
	Tag            tpmutil.Tag
	Version        capVersion
	SpecLevel      uint16
	ErrataRev      byte
	TPMVendorID    [4]byte
	VendorSpecific tpmutil.U16Bytes
}
func (c *CapVersionInfo) Decode(data []byte) error {
	var cV capVersion
	buf := bytes.NewReader(data)
	err := binary.Read(buf, binary.LittleEndian, &c.Tag)
	if err != nil {
		return err
	}
	err = binary.Read(buf, binary.LittleEndian, &cV.Major)
	if err != nil {
		return err
	}
	err = binary.Read(buf, binary.LittleEndian, &cV.Minor)
	if err != nil {
		return err
	}
	err = binary.Read(buf, binary.LittleEndian, &cV.RevMajor)
	if err != nil {
		return err
	}
	err = binary.Read(buf, binary.LittleEndian, &cV.RevMinor)
	if err != nil {
		return err
	}
	c.Version = cV
	err = binary.Read(buf, binary.LittleEndian, &c.SpecLevel)
	if err != nil {
		return err
	}
	err = binary.Read(buf, binary.LittleEndian, &c.ErrataRev)
	if err != nil {
		return err
	}
	err = binary.Read(buf, binary.LittleEndian, &c.TPMVendorID)
	if err != nil {
		return err
	}
	var venspecificLen uint16
	err = binary.Read(buf, binary.LittleEndian, &venspecificLen)
	if err != nil {
		return err
	}
	venSpecData := make([]byte, venspecificLen)
	err = binary.Read(buf, binary.LittleEndian, &venSpecData)
	if err != nil {
		return err
	}
	c.VendorSpecific = venSpecData
	return nil
}
type PermanentFlags struct {
	Tag                          uint16
	Disable                      bool
	Ownership                    bool
	Deactivated                  bool
	ReadPubEK                    bool
	DisableOwnerClear            bool
	AllowMaintenance             bool
	PhysicalPresenceLifetimeLock bool
	PhysicalPresenceHWEnable     bool
	PhysicalPresenceCMDEnable    bool
	CEKPUsed                     bool
	TPMPost                      bool
	TPMPostLock                  bool
	FIPS                         bool
	Operator                     bool
	EnableRevokeEK               bool
	NVLocked                     bool
	ReadSRKPub                   bool
	TPMEstablished               bool
	MaintenanceDone              bool
	DisableFullDALogicInfo       bool
}
type nvAttributes struct {
	Tag        uint16
	Attributes Permission
}
type NVDataPublic struct {
	Tag          uint16
	NVIndex      uint32
	PCRInfoRead  pcrInfoShort
	PCRInfoWrite pcrInfoShort
	Permission   nvAttributes
	ReadSTClear  bool
	WriteSTClear bool
	WriteDefine  bool
	Size         uint32
}
func CloseKey(rw io.ReadWriter, h tpmutil.Handle) error {
	return flushSpecific(rw, h, rtKey)
}
type Nonce [20]byte
type oiapResponse struct {
	AuthHandle tpmutil.Handle
	NonceEven  Nonce
}
func (opr oiapResponse) String() string {
	return fmt.Sprintf("oiapResponse{AuthHandle: %x, NonceEven: % x}", opr.AuthHandle, opr.NonceEven)
}
func (opr *oiapResponse) Close(rw io.ReadWriter) error {
	return flushSpecific(rw, opr.AuthHandle, rtAuth)
}
type osapCommand struct {
	EntityType  uint16
	EntityValue tpmutil.Handle
	OddOSAP     Nonce
}
func (opc osapCommand) String() string {
	return fmt.Sprintf("osapCommand{EntityType: %x, EntityValue: %x, OddOSAP: % x}", opc.EntityType, opc.EntityValue, opc.OddOSAP)
}
type osapResponse struct {
	AuthHandle tpmutil.Handle
	NonceEven  Nonce
	EvenOSAP   Nonce
}
func (opr osapResponse) String() string {
	return fmt.Sprintf("osapResponse{AuthHandle: %x, NonceEven: % x, EvenOSAP: % x}", opr.AuthHandle, opr.NonceEven, opr.EvenOSAP)
}
func (opr *osapResponse) Close(rw io.ReadWriter) error {
	return flushSpecific(rw, opr.AuthHandle, rtAuth)
}
type Digest [20]byte
type authValue [20]byte
const authSize uint32 = 20
type sealCommand struct {
	KeyHandle tpmutil.Handle
	EncAuth   authValue
}