Server
 
로딩중...
검색중...
일치하는것 없음
hash.cpp 파일 참조

비밀번호 및 복구 코드 해싱 구현 파일 더 자세히 ...

#include "hash.hpp"
hash.cpp에 대한 include 의존 그래프

함수

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 알고리즘을 사용하여 비밀번호와 복구 코드를 해싱하고 검증하는 기능을 제공합니다. 또한 복구 코드를 생성하는 기능도 포함합니다.

함수 Documentation

◆ generate_recovery_codes()

std::vector< std::string > generate_recovery_codes ( )

복구 코드를 생성합니다.

이 함수는 10자리의 랜덤한 알파벳 대소문자와 숫자로 이루어진 복구 코드를 생성합니다.

반환값
생성된 복구 코드 문자열 벡터

◆ hash_password()

string hash_password ( const string &  password)

Argon2id를 사용하여 비밀번호를 해싱합니다.

매개변수
password평문 비밀번호
반환값
해싱된 비밀번호 문자열

◆ hash_recovery_codes()

std::vector< std::string > hash_recovery_codes ( const std::vector< std::string > &  codes)

복구 코드를 해싱합니다.

매개변수
codes복구 코드 문자열 벡터
반환값
해싱된 복구 코드 문자열 벡터

◆ verify_password()

bool verify_password ( const string &  hashed_password,
const string &  password 
)

Argon2id를 사용하여 비밀번호를 검증합니다.

매개변수
hashed_password해싱된 비밀번호
password평문 비밀번호
반환값
비밀번호가 일치하면 true, 그렇지 않으면 false