23 lines
647 B
C++
23 lines
647 B
C++
#ifndef ENCRYPT_H
|
|
#define ENCRYPT_H
|
|
#pragma once
|
|
|
|
#include <cstring>
|
|
#include <iostream>
|
|
#include <sodium.h>
|
|
#include <string>
|
|
|
|
using std::string;
|
|
/*
|
|
hash_password takes the password, and encrypts it. This needs to be done,
|
|
because storing passwords in plaintext is BAD!
|
|
|
|
verify_password takes in a password and the hashed password, and then does magic encryption
|
|
stuff(no, not really. It basically hashes the password with the same salt and other parameters) and
|
|
to see if the password stored and the given password match.
|
|
*/
|
|
|
|
string hash_password(string password);
|
|
bool verify_password(string hashed_password, string unhashed_password);
|
|
|
|
#endif |