public static function secureString($string, $privateInfo, $padWith = 'x')
    {
        $result = $string;

        if (empty($privateInfo)) {
            return $result;
        }

        if (!is_array($privateInfo)) {
            $privateInfo = array($privateInfo);
        }

        foreach ($privateInfo as $privateString) {
            $replacement = str_repeat($padWith, strlen($privateString));
            $result = str_replace($privateString, $replacement, $result);
        }

        return $result;
    }