/sshpubkey-validator

Validates ssh rsa pubkeys

Primary LanguagePHPMIT LicenseMIT

SSHPubKeyValidator

Latest Version on Packagist Software License Build Status Coverage Status Quality Score Total Downloads

This package serves to take in an ssh-rsa key and validate whether the key is in a valid format. I'm sure there is a better way to do this but I couldn't find anything better in pure php.

Install

Via Composer

$ composer require montross50/sshpubkey-validator

Usage

$validator = new montross50\SSHPubKeyValidator();
$key = "ssh-rsa .......";
if($validator->validateKey($key)){
    //key is valid
}
else{
    //key is invalid
}

Change log

Please see CHANGELOG for more information on what has changed recently.

Testing

$ composer test

Contributing

Please see CONTRIBUTING and CODE_OF_CONDUCT for details.

Security

If you discover any security related issues, please email sch43228@gmail.com instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.