Last active
August 7, 2020 22:24
-
-
Save manish-manghwani/bda7120637e3cec6bfd83e3b1fc087c7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| input=$(whiptail --inputbox "Encrypt input" 8 39 input --title "Encryption Utility" 3>&1 1>&2 2>&3) | |
| selectedOption=$(whiptail --title "Utilities" \ | |
| --radiolist "Select Utility:" 10 80 3 \ | |
| 1 bcrypt on \ | |
| 2 Argon2i off \ | |
| 3 Argon2iD off \ | |
| 3>&1 1>&2 2>&3) | |
| if [ $selectedOption = 1 ] | |
| then | |
| php -r "echo password_hash( '$input', PASSWORD_BCRYPT );" | |
| elif [ $selectedOption = 2 ] | |
| then | |
| php -r "echo password_hash( '$input', PASSWORD_ARGON2I );" | |
| else | |
| php -r "echo password_hash( '$input', PASSWORD_ARGON2ID ) ;" | |
| fi | |
| exit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment