Luanti 5.10.0-dev
 
Loading...
Searching...
No Matches
auth.h
Go to the documentation of this file.
1// Luanti
2// SPDX-License-Identifier: LGPL-2.1-or-later
3// Copyright (C) 2015, 2016 est31 <MTest31@outlook.com>
4
5#pragma once
6
8std::string translate_password(const std::string &name,
9 const std::string &password);
10
12std::string generate_srp_verifier(const std::string &name,
13 const std::string &password, const std::string &salt);
14
16void generate_srp_verifier_and_salt(const std::string &name,
17 const std::string &password, std::string *verifier,
18 std::string *salt);
19
22std::string get_encoded_srp_verifier(const std::string &name,
23 const std::string &password);
24
26std::string encode_srp_verifier(const std::string &verifier,
27 const std::string &salt);
28
31bool decode_srp_verifier_and_salt(const std::string &encoded,
32 std::string *verifier, std::string *salt);
void generate_srp_verifier_and_salt(const std::string &name, const std::string &password, std::string *verifier, std::string *salt)
Creates a verification key and salt with given password.
Definition auth.cpp:67
bool decode_srp_verifier_and_salt(const std::string &encoded, std::string *verifier, std::string *salt)
Reads the DB-formatted SRP verifier and gets the verifier and salt components.
Definition auth.cpp:106
std::string get_encoded_srp_verifier(const std::string &name, const std::string &password)
Gets an SRP verifier, generating a salt, and encodes it as DB-ready string.
Definition auth.cpp:84
std::string generate_srp_verifier(const std::string &name, const std::string &password, const std::string &salt)
Creates a verification key with given salt and password.
Definition auth.cpp:50
std::string translate_password(const std::string &name, const std::string &password)
Gets the base64 encoded legacy password db entry.
Definition auth.cpp:19
std::string encode_srp_verifier(const std::string &verifier, const std::string &salt)
Converts the passed SRP verifier into a DB-ready format.
Definition auth.cpp:94