mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
remove make string hash function which is not working in php
This commit is contained in:
parent
8fc5d65f22
commit
0bcc782388
@ -369,7 +369,20 @@ class TransactionCreationsController extends AppController
|
|||||||
$pendings[$id] = $localAmountCent;
|
$pendings[$id] = $localAmountCent;
|
||||||
}
|
}
|
||||||
$pubKeyHex = bin2hex(stream_get_contents($receiverUser->public_key));
|
$pubKeyHex = bin2hex(stream_get_contents($receiverUser->public_key));
|
||||||
$identHash = TransactionCreation::DRMakeStringHash($receiverUser->email);
|
$requestAnswear = $this->JsonRequestClient->sendRequest(json_encode([
|
||||||
|
'session_id' => $session->read('session_id'),
|
||||||
|
'email' => $receiverUser->email,
|
||||||
|
'ask' => ['user.identHash']
|
||||||
|
]), '/getUserInfos');
|
||||||
|
|
||||||
|
$identHash = 0;
|
||||||
|
if('success' == $requestAnswear['state'] && 'success' == $requestAnswear['data']['state']) {
|
||||||
|
$identHash = $requestAnswear['data']['userData']['identHash'];
|
||||||
|
} else {
|
||||||
|
$this->Flash->error(__('Error by requesting LoginServer, please try again'));
|
||||||
|
}
|
||||||
|
|
||||||
|
//$identHash = TransactionCreation::DRMakeStringHash($receiverUser->email);
|
||||||
$localTargetDateFrozen = FrozenDate::now();
|
$localTargetDateFrozen = FrozenDate::now();
|
||||||
$localTargetDateFrozen = $localTargetDateFrozen
|
$localTargetDateFrozen = $localTargetDateFrozen
|
||||||
->year($localTargetDate['year'])
|
->year($localTargetDate['year'])
|
||||||
|
|||||||
@ -63,24 +63,6 @@ class TransactionCreation extends TransactionBase {
|
|||||||
return ['state' => 'success', 'transactionBody' => $transactionBody];
|
return ['state' => 'success', 'transactionBody' => $transactionBody];
|
||||||
}
|
}
|
||||||
|
|
||||||
static protected function DRHashRotateLeft( $hash, $rotateBy )
|
|
||||||
{
|
|
||||||
return ($hash<<$rotateBy)|($hash>>(32-$rotateBy));
|
|
||||||
}
|
|
||||||
|
|
||||||
static public function DRMakeStringHash($str)
|
|
||||||
{
|
|
||||||
$ret = 0;
|
|
||||||
|
|
||||||
if( $str )
|
|
||||||
{
|
|
||||||
for ($i=0; $i < strlen($str); $i++)
|
|
||||||
{
|
|
||||||
$ret = TransactionCreation::DRHashRotateLeft($ret, 7) + ord($str{$i});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return $ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getAmount() {
|
public function getAmount() {
|
||||||
return $this->protoTransactionCreation->getReceiverAmount()->getAmount();
|
return $this->protoTransactionCreation->getReceiverAmount()->getAmount();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user