https://github.com/akshatvg/secure-hashed-authentication
blake2b & md5 based registration and login in PHP to show a secure hashed password.
https://github.com/akshatvg/secure-hashed-authentication
algorithm authentication blake2b blake2b-hash-algorithm cyber-security hashing login md5 networks nis php project register security
Last synced: 3 months ago
JSON representation
blake2b & md5 based registration and login in PHP to show a secure hashed password.
- Host: GitHub
- URL: https://github.com/akshatvg/secure-hashed-authentication
- Owner: akshatvg
- License: mit
- Created: 2020-10-23T20:32:07.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2020-10-27T13:28:43.000Z (almost 5 years ago)
- Last Synced: 2025-06-29T01:42:12.856Z (4 months ago)
- Topics: algorithm, authentication, blake2b, blake2b-hash-algorithm, cyber-security, hashing, login, md5, networks, nis, php, project, register, security
- Language: PHP
- Homepage:
- Size: 172 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Secure Hashed Authentication
[](https://github.com/akshatvg/) [](https://github.com/akshatvg/) [](https://github.com/akshatvg/Secure-Hashed-Authentication/stargazers) [](https://github.com/akshatvg/Secure-Hashed-Authentication/network)
blake2b & md5 based registration and login in PHP to show a secure hashed password.
![]()
![]()

## How it works
- The project uses both blake2b and md5 to hash the password so it can't be unencrypted or stolen or intercepted.
- We first remove backslashes to ensure no XSS Attack can take place.
- We then escape special characters in a string to ensure SQL Injection and XSS Attacks aren't possible. This doesn't affect the password's strength as the user enters the same password to login as while signing up. He/she won't even know this procedure took place.
- The password is hashed with the blake2b hashing algorithm.
- The password is then hashed with the md5 hashing algorithm.
- The same procedure is repeated for both login and registration to ensure the final hashed value is the same and hence login doesn't fail.## Useful Links
- [deemru's blake2b implementation in PHP](https://github.com/deemru/Blake2b)
## Requirements
[](https://github.com/akshatvg/)
The source code of this project is written in **`PHP`**. You will need to install composer to run this project.
## Instructions
1. Enter the following commands in terminal or the command prompt:
```bash
$ git clone https://github.com/akshatvg/Secure-Hashed-Authentication
$ cd Secure-Hashed-Authentication
$ composer install
```
2. Import `database.sql` into any database and then enter these details in `db.php`.
3. Register and then login.## Need help?
Feel free to contact me via [Facebook](https://www.facebook.com/akshatvg).
Invite me to connect on [LinkedIn](https://www.linkedin.com/in/akshatvg/).
[](https://www.facebook.com/akshatvg) [](https://www.quora.com/profile/Akshat-Gupta-279) [](https://www.instagram.com/akshatvg/) [](https://www.snapchat.com/add/akshatvg) [](https://medium.com/@akshatvg)
```bash
_____ _ _ __ __
|_ _| | | | \ \ / /
| | | |__ __ _ _ __ | | __ \ V /___ _ _
| | | '_ \ / _` | '_ \| |/ / \ // _ \| | | |
| | | | | | (_| | | | | < | | (_) | |_| |
\_/ |_| |_|\__,_|_| |_|_|\_\ \_/\___/ \__,_|
______
| ___|
| |_ ___ _ __
| _/ _ \| '__|
| || (_) | |
\_| \___/|_|
______ _ _ _ _
| ___ \ (_) | | | | | |
| |_/ / ___ _ _ __ __ _ | |_| | ___ _ __ ___| |
| ___ \/ _ \ | '_ \ / _` | | _ |/ _ \ '__/ _ \ |
| |_/ / __/ | | | | (_| | | | | | __/ | | __/_|
\____/ \___|_|_| |_|\__, | \_| |_/\___|_| \___(_)
__/ |
|___/
```
## License
**MIT © [Akshat Gupta](https://github.com/akshatvg/Secure-Hashed-Authentication/blob/master/LICENSE)**
[](https://github.com/akshatvg/Secure-Hashed-Authentication/blob/master/LICENSE) [](https://twitter.com/akshatvg)
---------
```javascript
if (youEnjoyed) {
starThisRepository();
}```
-----------