spam

package
v0.0.0-...-edbb0c7 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2021 License: BSD-3-Clause Imports: 12 Imported by: 0

README

spam

package spam defines some library functions for dealing with spams.

Functions

func Define

func Define(tpm io.ReadWriter, slot uint16, platformAuth string) error

Define sets up a spam at the specified slot.

func GetPolicy

func GetPolicy(policy *policypb.Policy) ([]byte, error)

GetPolicy gets the TPM policy hash for a given spam policy.

func Read

func Read(tpm io.ReadWriter, slot uint16) (*[64]byte, error)

Read reads the spam at the specified slot.

func SatisfyPolicy

func SatisfyPolicy(tpm io.ReadWriter, session tpmutil.Handle, pol *policypb.Policy) error

SatisfyPolicy runs a spam policy in the given policy session. Fails if the policy is not satisfiable.

func Undefine

func Undefine(tpm io.ReadWriter, slot uint16, platformAuth string) error

Undefine undefines the spam at the specified slot.

func Write

func Write(tpm io.ReadWriter, slot uint16, data [64]byte) error

Write writes the spam at the specified slot.


Readme created from Go doc with goreadme

Documentation

Overview

package spam defines some library functions for dealing with spams.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Define

func Define(tpm io.ReadWriter, slot uint16, platformAuth string) error

Define sets up a spam at the specified slot.

func GetPolicy

func GetPolicy(policy *policypb.Policy) ([]byte, error)

GetPolicy gets the TPM policy hash for a given spam policy.

func Read

func Read(tpm io.ReadWriter, slot uint16) (*[64]byte, error)

Read reads the spam at the specified slot.

func SatisfyPolicy

func SatisfyPolicy(tpm io.ReadWriter, session tpmutil.Handle, pol *policypb.Policy) error

SatisfyPolicy runs a spam policy in the given policy session. Fails if the policy is not satisfiable.

func Undefine

func Undefine(tpm io.ReadWriter, slot uint16, platformAuth string) error

Undefine undefines the spam at the specified slot.

func Write

func Write(tpm io.ReadWriter, slot uint16, data [64]byte) error

Write writes the spam at the specified slot.

Types

This section is empty.

Jump to

Keyboard shortcuts

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