private SimpleHash createSimpleHash(String algorithmName, ByteSource source,
                                            int iterations, ByteSource publicSalt, ByteSource salt) {
            Hash computed = new SimpleHash(algorithmName, source, salt, iterations);

            SimpleHash result = new SimpleHash(algorithmName);
            result.setBytes(computed.getBytes());
            result.setIterations(iterations);
            //Only expose the public salt - not the real/combined salt that might have been used:
            result.setSalt(publicSalt);

            return result;
        }
Returns the public salt that should be used to compute a hash based on the specified request.
<p/>
This implementation functions as follows:
<ol>
  <li>If the request salt is not null and non-empty, this will be used, return it.</li>
  <li>If the request salt is null or empty:
    <ol><li>create a new 16-byte salt.</li></ol>
  </li>
</ol>

@param request request the request to process
@return the public salt that should be used to compute a hash based on the specified request or
{@code null} if no public salt should be used.
crypto/hash/src/main/java/org/apache/shiro/crypto/hash/SimpleHashProvider.java