R-Type
Distributed multiplayer game engine in C++
Loading...
Searching...
No Matches
IPasswordHasher.hpp
Go to the documentation of this file.
1/*
2** EPITECH PROJECT, 2025
3** r-type
4** File description:
5** IPasswordHasher - Interface for password hashing implementations
6*/
7
8#pragma once
9
10#include <string>
11
20 public:
21 virtual ~IPasswordHasher() = default;
22
29 virtual std::string hash(const std::string &password) = 0;
30
37 virtual bool verify(const std::string &password, const std::string &hash) = 0;
38};
Abstract interface for password hashing algorithms.
virtual std::string hash(const std::string &password)=0
Hash a plaintext password.
virtual bool verify(const std::string &password, const std::string &hash)=0
Verify a password against a hash.
virtual ~IPasswordHasher()=default