? true : false;
echo $confirm;
?>
Sorry this is late. If you haven't found a solution yet and don't mind a different dependency. I just came across the setup guide for portainer which suggests using htpasswd to set a password. http://kutt.jlisher.com/htpasswd You can use -B -C 10 options to set the behaviour to be similar to PHP's default. You can also specify your own hash file, example: #!/bin/bash ## create a password in a new file htpasswd -cbB -C 10 ./.user.htpasswd user password ## verify password htpasswd -bv ./.user.htpasswd user password
I will test, very much apriciated!!
i didn't want to use files exactly, i wanted to compare strings and hashes without files
The file format is rather simple, using the following format: username:password_hash. So you would look at creating a short lived file just for the validation then deleting it after. Not very elegant, but it could work as a not too complex solution.
i will consider it, thanks again!
Обсуждают сегодня