protected function normalizeParts(array $parts)
    {
        $blockSize = $this->getPartSize();
        $callback  = function ($value) {
            return Util::safeStrlen($value);
        };
        $maxSize = max(array_map($callback, $parts));
        if ($maxSize % $blockSize != 0) {
            $maxSize += $blockSize - ($maxSize % $blockSize);
        }
        foreach ($parts as &$part) {
            $part = $this->str_pad($part, $maxSize, chr(0));
            $part = str_split($part, $blockSize);
        }

        return $parts;
    }
protected function normalizeParts(array $parts)
    {
        $blockSize = $this->getPartSize();
        $callback  = function ($value) {
            return Util::safeStrlen($value);
        };
        $maxSize = max(array_map($callback, $parts));
        if ($maxSize % $blockSize != 0) {
            $maxSize += $blockSize - ($maxSize % $blockSize);
        }
        foreach ($parts as &$part) {
            $part = $this->str_pad($part, $maxSize, chr(0));
            $part = str_split($part, $blockSize);
        }

        return $parts;
    }
protected function normalizeParts ( array $ parts ) { $ blockSize = $ this -> getPartSize ( ) ; $ callback = function ( $ value ) { return Util :: safeStrlen ( $ value ) ; } ; $ maxSize = max ( array_map ( $ callback , $ parts ) ) ; if ( $ maxSize % $ blockSize != 0 ) { $ maxSize += $ blockSize - ( $ maxSize % $ blockSize ) ; } foreach ( $ parts as & $ part ) { $ part = $ this -> str_pad ( $ part , $ maxSize , chr ( 0 ) ) ; $ part = str_split ( $ part , $ blockSize ) ; } return $ parts ; }
Normalize the part array and split it block part size.

This will make all parts the same length and a multiple
of the part size

@param array $parts The parts to normalize

@return array The normalized and split parts
Normalize the part array and split it block part size .