You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
proiectPOO/Autoritate.h

36 lines
1.1 KiB

//
// Created by ioachim on 18.05.2025.
//
#ifndef AUTORITATE_H
#define AUTORITATE_H
#include "common.h"
#include "Document.h"
class Autoritate {
private:
std::string autoritateID;
std::string nume;
std::string passHash;
public:
Autoritate(): autoritateID(""), nume(""), passHash("") {}
Autoritate(const std::string& id, const std::string& name, const std::string& password) : autoritateID(id), nume(name), passHash(hashString(password)) {}
Autoritate(const Autoritate& frate):
autoritateID(frate.autoritateID),
nume(frate.nume),
passHash(frate.passHash) {}
Autoritate& operator=(const Autoritate& frate);
~Autoritate();
friend std::ostream& operator <<(std::ostream& os, const Autoritate& user);
bool tryLogin(std::string _pass);
bool changePassword(std::string _pass, std::string _newpass);
std::string getName();
void emiteAnexa(Document* _doc, std::string _anex);
Document* emiteDocument(std::string _nume, std::string _continut, User* _Titular, Zi* _data_emitere, Zi* _data_expirare);
};
#endif //AUTORITATE_H