montross50 / sshpubkey-validator
Validate ssh-rsa key for valid openssh format.
Installs: 13 964
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Requires
- php: >5.6
- ext-openssl: *
- phpseclib/phpseclib: ~2.0
Requires (Dev)
- mockery/mockery: 0.9.*|1.0.*
- php-mock/php-mock-phpunit: ^1.1|^2.1
- phpunit/phpunit: >=5.4.3
- squizlabs/php_codesniffer: ^2.3
This package is auto-updated.
Last update: 2024-10-24 01:54:46 UTC
README
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.