Luanti 5.10.0-dev
 
Loading...
Searching...
No Matches
auth.h File Reference
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

std::string translate_password (const std::string &name, const std::string &password)
 Gets the base64 encoded legacy password db entry.
 
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.
 
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.
 
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.
 
std::string encode_srp_verifier (const std::string &verifier, const std::string &salt)
 Converts the passed SRP verifier into a DB-ready format.
 
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.
 

Function Documentation

◆ decode_srp_verifier_and_salt()

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.

References base64_decode(), base64_is_valid(), and str_split().

Referenced by Server::handleCommand_SrpBytesA(), and ModApiUtil::l_check_password_entry().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ encode_srp_verifier()

std::string encode_srp_verifier ( const std::string & verifier,
const std::string & salt )

Converts the passed SRP verifier into a DB-ready format.

References base64_encode().

Referenced by get_encoded_srp_verifier(), and Server::handleCommand_FirstSrp().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ generate_srp_verifier()

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.

References gen_srp_v().

Referenced by ModApiUtil::l_check_password_entry().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ generate_srp_verifier_and_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.

References gen_srp_v().

Referenced by get_encoded_srp_verifier(), Server::handleCommand_SrpBytesA(), and Client::startAuth().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ get_encoded_srp_verifier()

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.

References encode_srp_verifier(), and generate_srp_verifier_and_salt().

Referenced by Server::handleCommand_Init().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ translate_password()

std::string translate_password ( const std::string & name,
const std::string & password )

Gets the base64 encoded legacy password db entry.

References SHA1::addBytes(), base64_encode(), and SHA1::getDigest().

Referenced by ModApiUtil::l_check_password_entry(), ModApiUtil::l_get_password_hash(), and Client::startAuth().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: