pb

package
v3.2.3-jaredallard.2 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2025 License: GPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_internal_pb_hdr_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Header struct {
	ChunkSize uint32        `protobuf:"varint,1,opt,name=chunk_size,json=chunkSize,proto3" json:"chunk_size,omitempty"` // encryption block size
	Salt      []byte        `protobuf:"bytes,2,opt,name=salt,proto3" json:"salt,omitempty"`                             // master salt (nonces are derived from this)
	Pk        []byte        `protobuf:"bytes,3,opt,name=pk,proto3" json:"pk,omitempty"`                                 // ephemeral curve PK
	Sender    []byte        `protobuf:"bytes,4,opt,name=sender,proto3" json:"sender,omitempty"`                         // sender signed artifacts
	Keys      []*WrappedKey `protobuf:"bytes,5,rep,name=keys,proto3" json:"keys,omitempty"`                             // list of wrapped receiver blocks
	// contains filtered or unexported fields
}

Every encrypted file starts with a header describing the Block Size, Salt, Recipient keys etc. Header represents a decoded version of this information. It is encoded in protobuf format before writing to disk.

func (*Header) Descriptor deprecated

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

Deprecated: Use Header.ProtoReflect.Descriptor instead.

func (*Header) GetChunkSize

func (x *Header) GetChunkSize() uint32

func (*Header) GetKeys

func (x *Header) GetKeys() []*WrappedKey

func (*Header) GetPk

func (x *Header) GetPk() []byte

func (*Header) GetSalt

func (x *Header) GetSalt() []byte

func (*Header) GetSender

func (x *Header) GetSender() []byte

func (*Header) MarshalTo

func (m *Header) MarshalTo(buf []byte) (int, error)

func (*Header) MarshalToSizedBufferVT

func (m *Header) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*Header) MarshalToVT

func (m *Header) MarshalToVT(dAtA []byte) (int, error)

func (*Header) MarshalVT

func (m *Header) MarshalVT() (dAtA []byte, err error)

func (*Header) ProtoMessage

func (*Header) ProtoMessage()

func (*Header) ProtoReflect

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

func (*Header) Reset

func (x *Header) Reset()

func (*Header) Size

func (m *Header) Size() int

func (*Header) SizeVT

func (m *Header) SizeVT() (n int)

func (*Header) String

func (x *Header) String() string

func (*Header) Unmarshal

func (m *Header) Unmarshal(buf []byte) error

func (*Header) UnmarshalVT

func (m *Header) UnmarshalVT(dAtA []byte) error

type WrappedKey

type WrappedKey struct {
	DKey  []byte `protobuf:"bytes,1,opt,name=d_key,json=dKey,proto3" json:"d_key,omitempty"` // encrypted data key
	Nonce []byte `protobuf:"bytes,2,opt,name=nonce,proto3" json:"nonce,omitempty"`           // nonce used for encryption
	// contains filtered or unexported fields
}

A file encryption key is wrapped by a recipient specific public key. WrappedKey describes such a wrapped key.

func (*WrappedKey) Descriptor deprecated

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

Deprecated: Use WrappedKey.ProtoReflect.Descriptor instead.

func (*WrappedKey) GetDKey

func (x *WrappedKey) GetDKey() []byte

func (*WrappedKey) GetNonce

func (x *WrappedKey) GetNonce() []byte

func (*WrappedKey) MarshalToSizedBufferVT

func (m *WrappedKey) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*WrappedKey) MarshalToVT

func (m *WrappedKey) MarshalToVT(dAtA []byte) (int, error)

func (*WrappedKey) MarshalVT

func (m *WrappedKey) MarshalVT() (dAtA []byte, err error)

func (*WrappedKey) ProtoMessage

func (*WrappedKey) ProtoMessage()

func (*WrappedKey) ProtoReflect

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

func (*WrappedKey) Reset

func (x *WrappedKey) Reset()

func (*WrappedKey) SizeVT

func (m *WrappedKey) SizeVT() (n int)

func (*WrappedKey) String

func (x *WrappedKey) String() string

func (*WrappedKey) UnmarshalVT

func (m *WrappedKey) UnmarshalVT(dAtA []byte) error

Jump to

Keyboard shortcuts

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