#ifndef CHROMEOS_CRYPTOHOME_CRYPTOHOME_PARAMETERS_H_
#define CHROMEOS_CRYPTOHOME_CRYPTOHOME_PARAMETERS_H_
#include <string>
#include <vector>
#include "base/basictypes.h"
#include "chromeos/chromeos_export.h"
namespace cryptohome {
enum AuthKeyPrivileges {
PRIV_MOUNT = 1 << 0,
PRIV_ADD = 1 << 1,
PRIV_REMOVE = 1 << 2,
PRIV_MIGRATE = 1 << 3,
PRIV_AUTHORIZED_UPDATE = 1 << 4,
PRIV_DEFAULT = PRIV_MOUNT | PRIV_ADD | PRIV_REMOVE | PRIV_MIGRATE
};
struct CHROMEOS_EXPORT Identification {
explicit Identification(const std::string& user_id) : user_id(user_id) {}
std::string user_id;
};
struct CHROMEOS_EXPORT KeyDefinition {
KeyDefinition(const std::string& key,
const std::string& label,
int privileges);
~KeyDefinition();
std::string label;
int revision;
std::string key;
std::string encryption_key;
std::string signature_key;
int privileges;
};
struct CHROMEOS_EXPORT Authorization {
Authorization(const std::string& key, const std::string& label);
explicit Authorization(const KeyDefinition& key);
std::string key;
std::string label;
};
class CHROMEOS_EXPORT MountParameters {
public:
explicit MountParameters(bool ephemeral);
~MountParameters();
bool ephemeral;
std::vector<KeyDefinition> create_keys;
};
}
#endif