private void hash(ByteSource source, ByteSource salt, int hashIterations) throws CodecException, UnknownAlgorithmException {
        byte[] saltBytes = requireNonNull(salt).getBytes();
        byte[] hashedBytes = hash(source.getBytes(), saltBytes, hashIterations);
        setBytes(hashedBytes);
    }
Converts a given object into a {@code ByteSource} instance.  Assumes the object can be converted to bytes.

@param object the Object to convert into a {@code ByteSource} instance.
@return the {@code ByteSource} representation of the specified object's bytes.
@since 1.2
crypto/hash/src/main/java/org/apache/shiro/crypto/hash/SimpleHash.java