Documentation
¶
Index ¶
- Constants
- func HMACSHA256Tag256KeyTPMNoPrefixTemplate() *tinkpb.KeyTemplate
- func HMACSHA256Tag256KeyTPMTemplate() *tinkpb.KeyTemplate
- func HMACSHA512Tag256KeyTPMNoPrefixTemplate() *tinkpb.KeyTemplate
- func HMACSHA512Tag256KeyTPMTemplate() *tinkpb.KeyTemplate
- type TPMHMACKeyManager
- func (km *TPMHMACKeyManager) DoesSupport(typeURL string) bool
- func (km *TPMHMACKeyManager) KeyMaterialType() tinkpb.KeyData_KeyMaterialType
- func (km *TPMHMACKeyManager) NewKey(serializedKeyFormat []byte) (proto.Message, error)
- func (km *TPMHMACKeyManager) NewKeyData(serializedKeyFormat []byte) (*tinkpb.KeyData, error)
- func (km *TPMHMACKeyManager) Primitive(serializedKey []byte) (interface{}, error)
- func (km *TPMHMACKeyManager) TypeURL() string
- func (km *TPMHMACKeyManager) UpdateAuthCallback(ac common.AuthCallback)
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 NewTPMHMACKeyManager ¶
func NewTPMHMACKeyManager(rwr io.ReadWriteCloser, ac common.AuthCallback) *TPMHMACKeyManager
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)
Click to show internal directories.
Click to hide internal directories.