crypt

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2022 License: Apache-2.0 Imports: 7 Imported by: 1

Documentation

Overview

Package crypt contains cryptographic protobuf messages.

Index

Constants

This section is empty.

Variables

View Source
var File_crypt_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type PublicKeyEncryptionKey

type PublicKeyEncryptionKey struct {
	Id   string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

func (*PublicKeyEncryptionKey) Descriptor deprecated

func (*PublicKeyEncryptionKey) Descriptor() ([]byte, []int)

Deprecated: Use PublicKeyEncryptionKey.ProtoReflect.Descriptor instead.

func (*PublicKeyEncryptionKey) GetData

func (x *PublicKeyEncryptionKey) GetData() []byte

func (*PublicKeyEncryptionKey) GetId

func (x *PublicKeyEncryptionKey) GetId() string

func (*PublicKeyEncryptionKey) ProtoMessage

func (*PublicKeyEncryptionKey) ProtoMessage()

func (*PublicKeyEncryptionKey) ProtoReflect

func (x *PublicKeyEncryptionKey) ProtoReflect() protoreflect.Message

func (*PublicKeyEncryptionKey) Reset

func (x *PublicKeyEncryptionKey) Reset()

func (*PublicKeyEncryptionKey) String

func (x *PublicKeyEncryptionKey) String() string

type SealedMessage

type SealedMessage struct {

	// The Curve25519 public key used to encrypt the data encryption key.
	KeyId string `protobuf:"bytes,1,opt,name=key_id,json=keyId,proto3" json:"key_id,omitempty"`
	// The XChacha20poly1305 key used to encrypt the data,
	// itself stored encrypted by the Curve25519 public key.
	DataEncryptionKey []byte `protobuf:"bytes,2,opt,name=data_encryption_key,json=dataEncryptionKey,proto3" json:"data_encryption_key,omitempty"`
	// The message type indicates the type of the protobuf message stored encrypted in encrypted_message.
	MessageType string `protobuf:"bytes,3,opt,name=message_type,json=messageType,proto3" json:"message_type,omitempty"`
	// An arbitrary encrypted protobuf message (marshaled as protojson before encryption).
	EncryptedMessage []byte `protobuf:"bytes,4,opt,name=encrypted_message,json=encryptedMessage,proto3" json:"encrypted_message,omitempty"`
	// contains filtered or unexported fields
}

A SealedMessage is an encrypted protobuf message.

func (*SealedMessage) Descriptor deprecated

func (*SealedMessage) Descriptor() ([]byte, []int)

Deprecated: Use SealedMessage.ProtoReflect.Descriptor instead.

func (*SealedMessage) GetDataEncryptionKey

func (x *SealedMessage) GetDataEncryptionKey() []byte

func (*SealedMessage) GetEncryptedMessage

func (x *SealedMessage) GetEncryptedMessage() []byte

func (*SealedMessage) GetKeyId

func (x *SealedMessage) GetKeyId() string

func (*SealedMessage) GetMessageType

func (x *SealedMessage) GetMessageType() string

func (*SealedMessage) MarshalZerologObject

func (x *SealedMessage) MarshalZerologObject(evt *zerolog.Event)

MarshalZerologObject fills the zerolog event fields.

func (*SealedMessage) ProtoMessage

func (*SealedMessage) ProtoMessage()

func (*SealedMessage) ProtoReflect

func (x *SealedMessage) ProtoReflect() protoreflect.Message

func (*SealedMessage) Reset

func (x *SealedMessage) Reset()

func (*SealedMessage) String

func (x *SealedMessage) String() string

func (*SealedMessage) UnmarshalFromRawZerolog

func (x *SealedMessage) UnmarshalFromRawZerolog(raw []byte) error

UnmarshalFromRawZerolog unmarshals a raw zerolog object into the sealed message.

Jump to

Keyboard shortcuts

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