The flow being used is based on the example from the Apache project. base64_encode then use random byte generation followed by base64_encode again to verify that a random set of bytes where used for the random creation of the salt.