Skip to content

Commit

Permalink
MAGE-541: Change hash method
Browse files Browse the repository at this point in the history
  • Loading branch information
Vincent Boulanger committed Jun 4, 2024
1 parent e4cd364 commit d0cae29
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/Payone/Api/Request/Abstract.php
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ public function getEncoding()
*/
public function setKey($key)
{
$this->key = md5($key);
$this->key = hash('sha384', $key);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion lib/Payone/Api/Request/Authorization/Abstract.php
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ protected function _getFrontendHash($aHashParams)
$sHashString .= $sValue;
}

return md5($sHashString);
return hash_hmac('sha384', $sHashString, $aHashParams['key']);
}

}
2 changes: 1 addition & 1 deletion lib/Payone/ClientApi/Request/Abstract.php
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ public function getEncoding()
*/
public function setKey($key)
{
$this->key = md5($key);
$this->key = hash('sha384', $key);
}

/**
Expand Down

0 comments on commit d0cae29

Please sign in to comment.