enigma

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_proto_enigma_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Config

type Config struct {

	// Version of the enigma filesystem config.
	//
	// The version must increment by 1 per modification.
	// The config has backward compatibility, which means the
	// filesystem engine must not attempt to open or modify
	// the filesystem of newer version, while must support
	// opening and modifying the one of older version one.
	Version uint64 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"`
	// Key is the AES-256 key of the filesystem.
	//
	// The field must be of length 32 since it is an AES-256
	// key. Since protobuf does not support defining byte
	// array of fixed length, an extra check of length will
	// be done on this field.
	Key []byte `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
	// PrefixLength is the length of nonce prefixing the
	// filename under each directories.
	//
	// The file names under each directories are protected
	// by a nonce prefix which is calculated from the real
	// file name and file name's length, through some pseudo
	// random process involving the key eventually.
	//
	// The minimum value of this field is 1 and maximum value
	// of this field is 8. Values exceeding this boundary
	// will be clamped towards the boundary.
	PrefixLength uint32 `protobuf:"varint,3,opt,name=prefix_length,json=prefixLength,proto3" json:"prefix_length,omitempty"`
	// contains filtered or unexported fields
}

Config is the backward compatible config of filesystem.

The message is created in the init phase of enigma filesystem, and must remain immutable upon the execution of the filesystem.

func (*Config) Descriptor deprecated

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

Deprecated: Use Config.ProtoReflect.Descriptor instead.

func (*Config) GetKey

func (x *Config) GetKey() []byte

func (*Config) GetPrefixLength

func (x *Config) GetPrefixLength() uint32

func (*Config) GetVersion

func (x *Config) GetVersion() uint64

func (*Config) ProtoMessage

func (*Config) ProtoMessage()

func (*Config) ProtoReflect

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

func (*Config) Reset

func (x *Config) Reset()

func (*Config) String

func (x *Config) String() string

Jump to

Keyboard shortcuts

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