src/McryptEncrypter.php
protected function paddingIsValid($pad, $value)
    {
        $beforePad = strlen($value) - $pad;

        return substr($value, $beforePad) == str_repeat(substr($value, -1), $pad);
    }
protected function paddingIsValid($pad, $value)
    {
        $beforePad = strlen($value) - $pad;

        return substr($value, $beforePad) == str_repeat(substr($value, -1), $pad);
    }
protected function paddingIsValid ( $ pad , $ value ) { $ beforePad = strlen ( $ value ) - $ pad ; return substr ( $ value , $ beforePad ) == str_repeat ( substr ( $ value , - 1 ) , $ pad ) ; }
Determine if the given padding for a value is valid.

@param  string  $pad
@param  string  $value
@return bool
Determine if the given padding for a value is valid .