Documentation ¶
Overview ¶
Package streamingprf provides implementations of streaming pseudorandom function families.
Index ¶
- type HKDFStreamingPRFKeyManager
- func (km *HKDFStreamingPRFKeyManager) DoesSupport(typeURL string) bool
- func (km *HKDFStreamingPRFKeyManager) NewKey(serializedKeyFormat []byte) (proto.Message, error)
- func (km *HKDFStreamingPRFKeyManager) NewKeyData(serializedKeyFormat []byte) (*tinkpb.KeyData, error)
- func (km *HKDFStreamingPRFKeyManager) Primitive(serializedKey []byte) (any, error)
- func (km *HKDFStreamingPRFKeyManager) TypeURL() string
- type StreamingPRF
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HKDFStreamingPRFKeyManager ¶
type HKDFStreamingPRFKeyManager struct{}
HKDFStreamingPRFKeyManager is a KeyManager for HKDF Streaming PRF keys. It is exported for use in keyderivation.prfBasedDeriver. This is not part of the public API as this is in internal/.
func (*HKDFStreamingPRFKeyManager) DoesSupport ¶
func (km *HKDFStreamingPRFKeyManager) DoesSupport(typeURL string) bool
DoesSupport returns true iff this KeyManager supports key type identified by typeURL.
func (*HKDFStreamingPRFKeyManager) NewKey ¶
func (km *HKDFStreamingPRFKeyManager) NewKey(serializedKeyFormat []byte) (proto.Message, error)
NewKey generates a new key according to specification in serializedKeyFormat. It is not implemented for this KeyManager to prevent the generation of keys of this key type.
func (*HKDFStreamingPRFKeyManager) NewKeyData ¶
func (km *HKDFStreamingPRFKeyManager) NewKeyData(serializedKeyFormat []byte) (*tinkpb.KeyData, error)
NewKeyData generates a new KeyData according to specification in serializedkeyFormat. This should be used solely by the key management API. It is not implemented for this KeyManager to prevent the generation of keys of this key type.
func (*HKDFStreamingPRFKeyManager) Primitive ¶
func (km *HKDFStreamingPRFKeyManager) Primitive(serializedKey []byte) (any, error)
Primitive constructs a primitive instance for the key given in serializedKey.
func (*HKDFStreamingPRFKeyManager) TypeURL ¶
func (km *HKDFStreamingPRFKeyManager) TypeURL() string
TypeURL returns the type URL that identifes the key type of keys managed by this KeyManager.
type StreamingPRF ¶
type StreamingPRF interface { // Compute computes the PRF selected by the specified key on input and returns // the result via a reader. Compute(input []byte) (io.Reader, error) }
StreamingPRF is the interface used to represent a streaming pseudorandom function family for a specified key.
It has the same properties as the PRF primitive.