mac

package
v2.0.0-...-f1ce5d7 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HMACKeyVersion = 0
)

Variables

This section is empty.

Functions

func HMACSHA256Tag256KeyTPMNoPrefixTemplate

func HMACSHA256Tag256KeyTPMNoPrefixTemplate() *tinkpb.KeyTemplate

func HMACSHA256Tag256KeyTPMTemplate

func HMACSHA256Tag256KeyTPMTemplate() *tinkpb.KeyTemplate

func HMACSHA512Tag256KeyTPMNoPrefixTemplate

func HMACSHA512Tag256KeyTPMNoPrefixTemplate() *tinkpb.KeyTemplate

func HMACSHA512Tag256KeyTPMTemplate

func HMACSHA512Tag256KeyTPMTemplate() *tinkpb.KeyTemplate

Types

type TPMHMACKeyManager

type TPMHMACKeyManager struct {
	TpmDevice    io.ReadWriteCloser // TPM read closer
	AuthCallback common.AuthCallback
}

hmacKeyManager generates new HMAC keys and produces new instances of HMAC.

func (*TPMHMACKeyManager) DoesSupport

func (km *TPMHMACKeyManager) DoesSupport(typeURL string) bool

DoesSupport checks whether this KeyManager supports the given key type.

func (*TPMHMACKeyManager) KeyMaterialType

func (km *TPMHMACKeyManager) KeyMaterialType() tinkpb.KeyData_KeyMaterialType

KeyMaterialType returns the key material type of this key manager.

func (*TPMHMACKeyManager) NewKey

func (km *TPMHMACKeyManager) NewKey(serializedKeyFormat []byte) (proto.Message, error)

NewKey generates a new HMACKey according to specification in the given HMACKeyFormat.

func (*TPMHMACKeyManager) NewKeyData

func (km *TPMHMACKeyManager) NewKeyData(serializedKeyFormat []byte) (*tinkpb.KeyData, error)

NewKeyData generates a new KeyData according to specification in the given serialized HMACKeyFormat. This should be used solely by the key management API.

func (*TPMHMACKeyManager) Primitive

func (km *TPMHMACKeyManager) Primitive(serializedKey []byte) (interface{}, error)

Primitive constructs a HMAC instance for the given serialized HMACKey.

func (*TPMHMACKeyManager) TypeURL

func (km *TPMHMACKeyManager) TypeURL() string

TypeURL returns the type URL of keys managed by this KeyManager.

func (*TPMHMACKeyManager) UpdateAuthCallback

func (km *TPMHMACKeyManager) UpdateAuthCallback(ac common.AuthCallback)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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