https://github.com/CryptDB/cryptdb
Raw File
Tip revision: 7678bc98d3054f1418371779c6d1050cd1a88b2e authored by Raluca Ada Popa on 04 January 2014, 01:31:06 UTC
small changes to readme
Tip revision: 7678bc9
search.hh
#pragma once

#include <vector>
#include <string>

class search {
 public:
    static const size_t defsize = 16;
    search(size_t csize_arg = defsize) : csize(csize_arg) {}

    bool match(const std::vector<std::string> &ctext,
               const std::string &wordkey);

 protected:
    bool match(const std::string &ctext,
               const std::string &wordkey);
    size_t csize;
};

class search_priv : public search {
 public:
    search_priv(const std::string &key, size_t csize_arg = defsize)
        : search(csize_arg), master_key(key) {}

    std::vector<std::string>
        transform(const std::vector<std::string> &words);
    std::string
        wordkey(const std::string &word);

 private:
    std::string
        transform(const std::string &word);
    std::string master_key;
};
back to top