protected static function validateSalt(string $salt): void
    {
        if (!ctype_print($salt)) {
            throw new InvalidArgumentException("Salt is not a printable string");
        }

        static::validateSaltMinLength();

        $saltLength = strlen($salt);
        if ($saltLength < static::$saltMinLength) {
            throw new InvalidArgumentException("Salt length of $saltLength characters is less than expected " . static::$saltMinLength);
        }
    }
protected static function validateSalt(string $salt): void
    {
        if (!ctype_print($salt)) {
            throw new InvalidArgumentException("Salt is not a printable string");
        }

        static::validateSaltMinLength();

        $saltLength = strlen($salt);
        if ($saltLength < static::$saltMinLength) {
            throw new InvalidArgumentException("Salt length of $saltLength characters is less than expected " . static::$saltMinLength);
        }
    }
protected static function validateSalt ( string $ salt ) : void { if ( ! ctype_print ( $ salt ) ) { throw new InvalidArgumentException ( "Salt is not a printable string" ) ; } static :: validateSaltMinLength ( ) ; $ saltLength = strlen ( $ salt ) ; if ( $ saltLength < static :: $ saltMinLength ) { throw new InvalidArgumentException ( "Salt length of $saltLength characters is less than expected " . static :: $ saltMinLength ) ; } }
Validate salt string

@throws \InvalidArgumentException when the salt string is not valid
@param string $salt Salt string to validate
@return void
Validate salt string