public function canBeUsedFor(string $usage) : bool
    {
        if (!in_array($usage, static::getValidKeyUsages(), true)) {
            throw new InvalidKeyUsageException($usage);
        }

        return isset($this->keyData[$usage]) && $this->keyData[$usage];
    }
public function canBeUsedFor(string $usage) : bool
    {
        if (!in_array($usage, static::getValidKeyUsages(), true)) {
            throw new InvalidKeyUsageException($usage);
        }

        return isset($this->keyData[$usage]) && $this->keyData[$usage];
    }
public function canBeUsedFor ( string $ usage ) : bool { if ( ! in_array ( $ usage , static :: getValidKeyUsages ( ) , true ) ) { throw new InvalidKeyUsageException ( $ usage ) ; } return isset ( $ this -> keyData [ $ usage ] ) && $ this -> keyData [ $ usage ] ; }
Whether or not the key is configured to be used for usage given

@param string $usage
@return bool
Whether or not the key is configured to be used for usage given