Skip to content

Commit

Permalink
Merge pull request #498 from BoulangerV/MAGE-541-Hash_method_ServerApi
Browse files Browse the repository at this point in the history
MAGE-541: Change hash method
  • Loading branch information
jvarelmann authored Jun 5, 2024
2 parents 627bcf8 + d0cae29 commit f9388a6
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 f9388a6

Please sign in to comment.