encryptedaction

package
v0.0.0-...-3b62dd1 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ActionGetPlaintext

func ActionGetPlaintext(action *encryptedaction_pb.Action, sharedSecret []byte) ([]byte, error)

ActionGetPlaintext decryptes the ciphertext that is embedded in an action, returning it in plaintext form.

func ActionSetCiphertext

func ActionSetCiphertext(action *encryptedaction_pb.Action, sharedSecret, plaintext []byte) error

ActionSetCiphertext sets the ciphertext and nonce fields that are embedded in an action to correspond to a given plaintext value.

Types

type EventEncoder

type EventEncoder struct {
	// contains filtered or unexported fields
}

EventEncoder can be used to convert plaintext data to encrypted Event messages, or vice versa.

func NewEventEncoder

func NewEventEncoder(action *encryptedaction_pb.Action, sharedSecret []byte) *EventEncoder

NewEventEncoder creates a new EventEncoder that is capable of encoding or decoding events belonging to a given action.

func (*EventEncoder) DecodeEvent

func (ee *EventEncoder) DecodeEvent(executionEvent *encryptedaction_pb.Event, isCompletionEvent bool) ([]byte, error)

DecodeEvent converts an Event message that was sent by a worker to a client back to the plaintext data contained within.

func (*EventEncoder) EncodeEvent

func (ee *EventEncoder) EncodeEvent(plaintext []byte, isCompletionEvent bool, randomNumberGenerator io.Reader) (*encryptedaction_pb.Event, error)

EncodeEvent converts plaintext data to an Event message that can be sent by a worker to a client.

Jump to

Keyboard shortcuts

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