indexer

package
v0.0.0-...-1fd911f Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2016 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SecureIndexBuilder

type SecureIndexBuilder struct {
	// contains filtered or unexported fields
}

SecureIndexBuilder stores the essential information needed to build the indexes for the documents.

func CreateSecureIndexBuilder

func CreateSecureIndexBuilder(h func() hash.Hash, masterSecret []byte, salts [][]byte, size uint64) *SecureIndexBuilder

CreateSecureIndexBuilder instantiates a `SecureIndexBuilder`. Sets up the hash function, and derives the keys from the master secret and salts by using PBKDF2. Finally, sets up the trapdoor function for the words.

func (*SecureIndexBuilder) BuildSecureIndex

func (sib *SecureIndexBuilder) BuildSecureIndex(docID int, document *os.File, fileLen int) index.SecureIndex

BuildSecureIndex builds the index for `document` with `docID` and an *encrypted* length of `fileLen`.

func (*SecureIndexBuilder) ComputeTrapdoors

func (sib *SecureIndexBuilder) ComputeTrapdoors(word string) [][]byte

ComputeTrapdoors computes the trapdoor values for `word`. This acts as the public getter for the trapdoorFunc field of SecureIndexBUilder.

Jump to

Keyboard shortcuts

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