package
0.9.3
Repository: https://github.com/google/go-tpm.git
Documentation: pkg.go.dev

# Packages

Package mssim implements the Microsoft simulator TPM2 Transmission Interface The Microsoft simulator TPM Command Transmission Interface (TCTI) is a remote procedure interface donated to the TPM2 Specification by Microsoft.

# Functions

NewEmulatorReadWriteCloser stores information about a Unix domain socket to write to and read from.
OpenTPM opens a channel to the TPM at the given path.
Pack encodes a set of elements into a single byte array, using encoding/binary.
RunCommand executes cmd with given tag and arguments.
RunCommandRaw executes the given raw command and returns the raw response.
Unpack is a convenience wrapper around UnpackBuf.
UnpackBuf recursively unpacks types from a reader just as encoding/binary does under binary.BigEndian, but with one difference: it unpacks a byte slice by first reading an integer with lengthPrefixSize bytes, then reading that many bytes.

# Constants

RCRetry is response code for TPM is busy.
RCSuccess is response code for successful command.

# Structs

EmulatorReadWriteCloser manages connections with a TPM emulator over a Unix domain socket.

# Interfaces

SelfMarshaler allows custom types to override default encoding/decoding behavior in Pack, Unpack and UnpackBuf.

# Type aliases

Command is an identifier of a TPM command.
A Handle is a reference to a TPM object.
RawBytes is for Pack and RunCommand arguments that are already encoded.
ResponseCode is a response code returned by TPM.
Tag is a command tag.
U16Bytes is a byte slice with a 16-bit header.
U32Bytes is a byte slice with a 32-bit header.