v1.8.1
This commit is contained in:
parent
1460cb231f
commit
27ce69c2d2
9 changed files with 188 additions and 61 deletions
|
|
@ -195,8 +195,8 @@ class Robotstxt_Manager_Encryption {
|
|||
* @return string 32-byte raw key.
|
||||
*/
|
||||
private static function derive_key(): string {
|
||||
$auth_key = defined( 'AUTH_KEY' ) ? AUTH_KEY : 'auth_key_not_defined';
|
||||
$auth_salt = defined( 'AUTH_SALT' ) ? AUTH_SALT : 'auth_salt_not_defined';
|
||||
$auth_key = defined( 'AUTH_KEY' ) && is_string( AUTH_KEY ) ? AUTH_KEY : 'auth_key_not_defined';
|
||||
$auth_salt = defined( 'AUTH_SALT' ) && is_string( AUTH_SALT ) ? AUTH_SALT : 'auth_salt_not_defined';
|
||||
|
||||
return substr(
|
||||
hash_hmac( 'sha256', self::CONTEXT, $auth_key . $auth_salt, true ),
|
||||
|
|
@ -214,8 +214,8 @@ class Robotstxt_Manager_Encryption {
|
|||
* @return string 32-byte raw key.
|
||||
*/
|
||||
private static function derive_mac_key(): string {
|
||||
$auth_key = defined( 'AUTH_KEY' ) ? AUTH_KEY : 'auth_key_not_defined';
|
||||
$auth_salt = defined( 'AUTH_SALT' ) ? AUTH_SALT : 'auth_salt_not_defined';
|
||||
$auth_key = defined( 'AUTH_KEY' ) && is_string( AUTH_KEY ) ? AUTH_KEY : 'auth_key_not_defined';
|
||||
$auth_salt = defined( 'AUTH_SALT' ) && is_string( AUTH_SALT ) ? AUTH_SALT : 'auth_salt_not_defined';
|
||||
|
||||
return substr(
|
||||
hash_hmac( 'sha256', self::MAC_CONTEXT, $auth_key . $auth_salt, true ),
|
||||
|
|
|
|||
Loading…
Reference in a new issue