Reading about [generating salt using Cryptographically Secure Pseudo-Random Number Generator (CSPRNG)](https://crackstation.net/hashing-security.htm#properhashing). This salt then will be appended to a string that needs to be hashed. 

However, the salt generated by CSPRNG function (for PHP I'm using [openssl\_random\_pseudo\_bytes](http://php.net/manual/en/function.base64-encode.php)) is actually binary data.

Confused about how I should append this binary data to a string, I saw this [PHP example for creating hash](https://crackstation.net/hashing-security.htm#phpsourcecode). It encodes binary data. 

So I just wanted to know if that is what I need to do. I need to encode salt to get a string. Then I can append that salt to a string that needs to be hashed. Or are there other ways of adding salt to a string? 

**note** I'm not hashing a password