Question: Is it not secure to typecast a submitted Password to a string? $b =(string)$a;
Comment: I dont want to know about more performant ways, i just want a safe way. Just for the following usecase:
Step 1 - Register Password (PW):
- Getting the PW by Registration,
- Casting it to String
- String to Hash
- Save Hash in MYSQL
Step 2 - Loginform, get PW:
- Getting PW via Form
- Casting it to String
- Getting Hash from Database
- comparing Both
I guess it is the most simple way, but one of the safest. I want to allow EVERY Character for PW,
- < / { } * #
and why not asian symbols. I thought: This method should not bring trouble with escapingproblems, as whatever was code, is now a string and is only compared with a string. But i can have every character, without danger. An Mysql database should allow every char when set to UTF8, right? So please answer me: Is this Idea to simpleminded?
Thank you in advance Gerd