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 May 31, 2024
1 parent e4cd364 commit 2a77c75
Show file tree
Hide file tree
Showing 3 changed files with 5 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_hmac('sha384', $key, $key);
}

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

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

return $hash;
}

}
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_hmac('sha384', $key, $key);
}

/**
Expand Down

0 comments on commit 2a77c75

Please sign in to comment.