When encrypting a BIOS Setup password that has an "-" (minus) character by the HP Tool "HPQPswd.exe" via GUI the error message "Illegal character! Your password must be alphanumeric." pops up.
Use a command to create a password file in silent mode:
HpqPswd.exe /s /p"Abcd-5678" /f"sample password.bin"
In this example, /p specifies the password, and /f specifies the name and path of the encrypted file.
WARNING: The encrypted *.bin BIOS password file can be esilly decrypted by a free available tool called HPQPswdD.