비밀번호 및 복구 코드 해싱 구현 파일 더 자세히 ...
#include "hash.hpp"
함수 | |
string | hash_password (const string &password) |
Argon2id를 사용하여 비밀번호를 해싱합니다. | |
bool | verify_password (const string &hashed_password, const string &password) |
Argon2id를 사용하여 비밀번호를 검증합니다. | |
std::vector< std::string > | hash_recovery_codes (const std::vector< std::string > &codes) |
복구 코드를 해싱합니다. | |
std::vector< std::string > | generate_recovery_codes () |
복구 코드를 생성합니다. | |
비밀번호 및 복구 코드 해싱 구현 파일
이 파일은 Argon2id 알고리즘을 사용하여 비밀번호와 복구 코드를 해싱하고 검증하는 기능을 제공합니다. 또한 복구 코드를 생성하는 기능도 포함합니다.
std::vector< std::string > generate_recovery_codes | ( | ) |
복구 코드를 생성합니다.
이 함수는 10자리의 랜덤한 알파벳 대소문자와 숫자로 이루어진 복구 코드를 생성합니다.
string hash_password | ( | const string & | password | ) |
Argon2id를 사용하여 비밀번호를 해싱합니다.
password | 평문 비밀번호 |
std::vector< std::string > hash_recovery_codes | ( | const std::vector< std::string > & | codes | ) |
복구 코드를 해싱합니다.
codes | 복구 코드 문자열 벡터 |
bool verify_password | ( | const string & | hashed_password, |
const string & | password | ||
) |
Argon2id를 사용하여 비밀번호를 검증합니다.
hashed_password | 해싱된 비밀번호 |
password | 평문 비밀번호 |