Found cryptography library that was very easy to install.
Have hashing and verification functs ready.
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
#define DATA_H
|
||||
#pragma once
|
||||
#include "../thirdparty/SQLiteCpp/include/SQLiteCpp/SQLiteCpp.h"
|
||||
#include "encrypt.h"
|
||||
|
||||
namespace data {
|
||||
SQLite::Database
|
||||
start_db();
|
||||
|
15
headers/encrypt.h
Normal file
15
headers/encrypt.h
Normal file
@@ -0,0 +1,15 @@
|
||||
#ifndef ENCRYPT_H
|
||||
#define ENCRYPT_H
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <cstring>
|
||||
#include <sodium.h>
|
||||
#include <iostream>
|
||||
|
||||
using std::string;
|
||||
|
||||
string hash_password(string password);
|
||||
bool verify_password(string hashed_password, string unhashed_password);
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user