24 lines
842 B
C++
24 lines
842 B
C++
|
/***
|
||
|
Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved.
|
||
|
|
||
|
File: BCrypt.hpp
|
||
|
Date: 2022-9-15
|
||
|
Author: Reece
|
||
|
|
||
|
Note: MD5 ($1$), the other numberic methods, and non-standard unix fuckery (ie: $sha1$) isn't implemented.
|
||
|
This API implements $2x$-class password hashing and verification
|
||
|
***/
|
||
|
#pragma once
|
||
|
|
||
|
namespace Aurora::Crypto::BCrypt
|
||
|
{
|
||
|
AUKN_SYM int GetForcedMinRounds();
|
||
|
|
||
|
AUKN_SYM AuString GenSalt(int rounds);
|
||
|
|
||
|
AUKN_SYM AuString HashPW(const AuString &password, const AuString &salt);
|
||
|
AUKN_SYM AuString HashPWEx(const Memory::MemoryViewRead &password, const AuString &salt);
|
||
|
|
||
|
AUKN_SYM bool CheckPassword(const AuString &password, const AuString &hashedPassword);
|
||
|
AUKN_SYM bool CheckPasswordEx(const Memory::MemoryViewRead &password, const AuString &hashedPassword);
|
||
|
}
|