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

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

#include <iostream>
#include <string>
#include <vector>
#include <stdexcept>
#include <random>
#include <sodium.h>
hash.hpp에 대한 include 의존 그래프
이 그래프는 이 파일을 직/간접적으로 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자리의 랜덤한 알파벳 대소문자와 숫자로 이루어진 복구 코드 문자열 벡터.

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

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

◆ hash_password()

string hash_password ( const string &  password)

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

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

◆ hash_recovery_codes()

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

복구 코드를 해싱합니다.

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

◆ verify_password()

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

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

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