2021-10-03 18:07:04 +08:00
|
|
|
// Copyright 2021 Memgraph Ltd.
|
|
|
|
//
|
|
|
|
// Licensed as a Memgraph Enterprise file under the Memgraph Enterprise
|
|
|
|
// License (the "License"); by using this file, you agree to be bound by the terms of the License, and you may not use
|
|
|
|
// this file except in compliance with the License. You may obtain a copy of the License at https://memgraph.com/legal.
|
|
|
|
//
|
|
|
|
//
|
|
|
|
|
2018-07-27 16:54:20 +08:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
|
|
|
|
namespace auth {
|
|
|
|
|
2020-01-15 20:57:58 +08:00
|
|
|
/// @throw AuthException if unable to encrypt the password.
|
2018-07-27 16:54:20 +08:00
|
|
|
const std::string EncryptPassword(const std::string &password);
|
|
|
|
|
2020-01-15 20:57:58 +08:00
|
|
|
/// @throw AuthException if unable to verify the password.
|
2018-07-27 16:54:20 +08:00
|
|
|
bool VerifyPassword(const std::string &password, const std::string &hash);
|
|
|
|
|
|
|
|
} // namespace auth
|