Base64 strings can contain "+", "=" and "/" characters. Also use PHP for hash generation (like the showcased symfony code).