// protoc --go_out=. ./proto/enigma.proto

// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// 	protoc-gen-go v1.25.0-devel
// 	protoc        v3.12.4
// source: proto/enigma.proto

package enigma

import (
	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
	reflect "reflect"
	sync "sync"
)

const (
	// Verify that this generated code is sufficiently up-to-date.
	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
	// Verify that runtime/protoimpl is sufficiently up-to-date.
	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)

// 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.
type Config struct {
	state         protoimpl.MessageState
	sizeCache     protoimpl.SizeCache
	unknownFields protoimpl.UnknownFields

	// 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"`
}

func (x *Config) Reset() {
	*x = Config{}
	if protoimpl.UnsafeEnabled {
		mi := &file_proto_enigma_proto_msgTypes[0]
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		ms.StoreMessageInfo(mi)
	}
}

func (x *Config) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*Config) ProtoMessage() {}

func (x *Config) ProtoReflect() protoreflect.Message {
	mi := &file_proto_enigma_proto_msgTypes[0]
	if protoimpl.UnsafeEnabled && x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use Config.ProtoReflect.Descriptor instead.
func (*Config) Descriptor() ([]byte, []int) {
	return file_proto_enigma_proto_rawDescGZIP(), []int{0}
}

func (x *Config) GetVersion() uint64 {
	if x != nil {
		return x.Version
	}
	return 0
}

func (x *Config) GetKey() []byte {
	if x != nil {
		return x.Key
	}
	return nil
}

func (x *Config) GetPrefixLength() uint32 {
	if x != nil {
		return x.PrefixLength
	}
	return 0
}

var File_proto_enigma_proto protoreflect.FileDescriptor

var file_proto_enigma_proto_rawDesc = []byte{
	0x0a, 0x12, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x65, 0x6e, 0x69, 0x67, 0x6d, 0x61, 0x2e, 0x70,
	0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x65, 0x6e, 0x69, 0x67, 0x6d, 0x61, 0x22, 0x59, 0x0a, 0x06,
	0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f,
	0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,
	0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x6b,
	0x65, 0x79, 0x12, 0x23, 0x0a, 0x0d, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x5f, 0x6c, 0x65, 0x6e,
	0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x70, 0x72, 0x65, 0x66, 0x69,
	0x78, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}

var (
	file_proto_enigma_proto_rawDescOnce sync.Once
	file_proto_enigma_proto_rawDescData = file_proto_enigma_proto_rawDesc
)

func file_proto_enigma_proto_rawDescGZIP() []byte {
	file_proto_enigma_proto_rawDescOnce.Do(func() {
		file_proto_enigma_proto_rawDescData = protoimpl.X.CompressGZIP(file_proto_enigma_proto_rawDescData)
	})
	return file_proto_enigma_proto_rawDescData
}

var file_proto_enigma_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_proto_enigma_proto_goTypes = []interface{}{
	(*Config)(nil), // 0: enigma.Config
}
var file_proto_enigma_proto_depIdxs = []int32{
	0, // [0:0] is the sub-list for method output_type
	0, // [0:0] is the sub-list for method input_type
	0, // [0:0] is the sub-list for extension type_name
	0, // [0:0] is the sub-list for extension extendee
	0, // [0:0] is the sub-list for field type_name
}

func init() { file_proto_enigma_proto_init() }
func file_proto_enigma_proto_init() {
	if File_proto_enigma_proto != nil {
		return
	}
	if !protoimpl.UnsafeEnabled {
		file_proto_enigma_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
			switch v := v.(*Config); i {
			case 0:
				return &v.state
			case 1:
				return &v.sizeCache
			case 2:
				return &v.unknownFields
			default:
				return nil
			}
		}
	}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: file_proto_enigma_proto_rawDesc,
			NumEnums:      0,
			NumMessages:   1,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_proto_enigma_proto_goTypes,
		DependencyIndexes: file_proto_enigma_proto_depIdxs,
		MessageInfos:      file_proto_enigma_proto_msgTypes,
	}.Build()
	File_proto_enigma_proto = out.File
	file_proto_enigma_proto_rawDesc = nil
	file_proto_enigma_proto_goTypes = nil
	file_proto_enigma_proto_depIdxs = nil
}
