pb

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2020 License: GPL-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package pb is a generated protocol buffer package.

It is generated from these files:

internal/pb/hdr.proto

It has these top-level messages:

Header
WrappedKey

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthHdr = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowHdr   = fmt.Errorf("proto: integer overflow")
)

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"`
	Salt       []byte        `protobuf:"bytes,2,opt,name=salt,proto3" json:"salt,omitempty"`
	Pk         []byte        `protobuf:"bytes,3,opt,name=pk,proto3" json:"pk,omitempty"`
	SenderSign []byte        `protobuf:"bytes,4,opt,name=sender_sign,json=senderSign,proto3" json:"sender_sign,omitempty"`
	Keys       []*WrappedKey `protobuf:"bytes,5,rep,name=keys" json:"keys,omitempty"`
}

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

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

func (*Header) Equal

func (this *Header) Equal(that interface{}) bool

func (*Header) GetChunkSize

func (m *Header) GetChunkSize() uint32

func (*Header) GetKeys

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

func (*Header) GetPk

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

func (*Header) GetSalt

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

func (*Header) GetSenderSign added in v1.1.0

func (m *Header) GetSenderSign() []byte

func (*Header) GoString

func (this *Header) GoString() string

func (*Header) Marshal

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

func (*Header) MarshalTo

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

func (*Header) ProtoMessage

func (*Header) ProtoMessage()

func (*Header) Reset

func (m *Header) Reset()

func (*Header) Size

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

func (*Header) String

func (this *Header) String() string

func (*Header) Unmarshal

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

type WrappedKey

type WrappedKey struct {
	DKey []byte `protobuf:"bytes,1,opt,name=d_key,json=dKey,proto3" json:"d_key,omitempty"`
}

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

func (*WrappedKey) Descriptor

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

func (*WrappedKey) Equal

func (this *WrappedKey) Equal(that interface{}) bool

func (*WrappedKey) GetDKey added in v1.1.0

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

func (*WrappedKey) GoString

func (this *WrappedKey) GoString() string

func (*WrappedKey) Marshal

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

func (*WrappedKey) MarshalTo

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

func (*WrappedKey) ProtoMessage

func (*WrappedKey) ProtoMessage()

func (*WrappedKey) Reset

func (m *WrappedKey) Reset()

func (*WrappedKey) Size

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

func (*WrappedKey) String

func (this *WrappedKey) String() string

func (*WrappedKey) Unmarshal

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

Jump to

Keyboard shortcuts

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