some phpcs fixes (#590)

* some phpcs fixes

* add default $hashalg
This commit is contained in:
Matthias Pfefferle 2023-12-07 12:30:44 +01:00 committed by GitHub
parent 93b2f1ee7d
commit e5fe4f20b7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 29 additions and 28 deletions

View file

@ -292,6 +292,7 @@ class Signature {
if ( is_array( $headers['digest'] ) ) {
$headers['digest'] = $headers['digest'][0];
}
$hashalg = 'sha256';
$digest = explode( '=', $headers['digest'], 2 );
if ( 'SHA-256' === $digest[0] ) {
$hashalg = 'sha256';