I'm not sure if you accept merge requests, but I noticed the code of this library was getting very stale, so I had some fun with the code, I changed a lot of stuff.
Cleanup
Added lots of linebreaks to make the code more easily readable.
Changed all array() to []
changed all the uses of 'sha256' to the const HASH_ALGORITHM
PSR-2
I reformatted all the code to conform to PSR-2, this includes splitting the classes to multiple files.
PSR-4
All files are now loadable using a psr-4 classloader, so I changed the loading mechanism of composer to use psr-4.
Convert and Utility classes
I split the conversion tasks from the U2F class to a separate class to keep the code tidy. Same for the Utility class.
Namespaced tests
I added the tests to their own namespace.
Security
random_bytes instead of openssl_random_pseudo_bytes
I believe it's now preferred to use random_bytes() instead of openssl_random_pseudo_bytes, and I added paragonie/random_compat to add support for PHP 5 back.
paragonie/constant_time_encoding
I added paragonie/constant_time_encoding to combat any timing issues that could be present because of the use of the PHP default base64_* functions.
Hiya,
I'm not sure if you accept merge requests, but I noticed the code of this library was getting very stale, so I had some fun with the code, I changed a lot of stuff.
Cleanup
PSR-2
I reformatted all the code to conform to PSR-2, this includes splitting the classes to multiple files.
PSR-4
All files are now loadable using a psr-4 classloader, so I changed the loading mechanism of composer to use psr-4.
Convert and Utility classes
I split the conversion tasks from the U2F class to a separate class to keep the code tidy. Same for the Utility class.
Namespaced tests
I added the tests to their own namespace.
Security
random_bytes instead of openssl_random_pseudo_bytes
I believe it's now preferred to use random_bytes() instead of openssl_random_pseudo_bytes, and I added
paragonie/random_compat
to add support for PHP 5 back.paragonie/constant_time_encoding
I added
paragonie/constant_time_encoding
to combat any timing issues that could be present because of the use of the PHP default base64_* functions.