src/Model/SshKey.php
public static function validatePublicKey($value)
    {
        $value = preg_replace('/\s+/', ' ', $value);
        if (!strpos($value, ' ')) {
            return false;
        }
        list($type, $key) = explode(' ', $value, 3);
        if (!in_array($type, static::$allowedAlgorithms) || base64_decode($key, true) === false) {
            return false;
        }

        return true;
    }
public static function validatePublicKey($value)
    {
        $value = preg_replace('/\s+/', ' ', $value);
        if (!strpos($value, ' ')) {
            return false;
        }
        list($type, $key) = explode(' ', $value, 3);
        if (!in_array($type, static::$allowedAlgorithms) || base64_decode($key, true) === false) {
            return false;
        }

        return true;
    }
public static function validatePublicKey ( $ value ) { $ value = preg_replace ( '/\s+/' , ' ' , $ value ) ; if ( ! strpos ( $ value , ' ' ) ) { return false ; } list ( $ type , $ key ) = explode ( ' ' , $ value , 3 ) ; if ( ! in_array ( $ type , static :: $ allowedAlgorithms ) || base64_decode ( $ key , true ) === false ) { return false ; } return true ; }
Validate an SSH public key.

@param string $value

@return bool
Validate an SSH public key .