mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
remove calls to removed DRMakeStringHash function
This commit is contained in:
parent
0bcc782388
commit
6ea10e2572
@ -69,14 +69,14 @@ class StateUsersController extends AppController
|
||||
$this->set(compact('stateUsers'));
|
||||
}
|
||||
|
||||
public function listIdentHashes()
|
||||
/*public function listIdentHashes()
|
||||
{
|
||||
$stateUsers = $this->StateUsers->find('all')->toArray();
|
||||
foreach ($stateUsers as $i => $user) {
|
||||
$stateUsers[$i]->identHash = TransactionCreation::DRMakeStringHash($user->email);
|
||||
}
|
||||
$this->set('stateUsers', $stateUsers);
|
||||
}
|
||||
}*/
|
||||
|
||||
public function search()
|
||||
{
|
||||
|
||||
@ -54,12 +54,12 @@ class TransactionCreationsController extends AppController
|
||||
];
|
||||
$transactionCreations = $this->paginate($this->TransactionCreations);
|
||||
$identHashes = [];
|
||||
foreach ($transactionCreations as $creation) {
|
||||
/*foreach ($transactionCreations as $creation) {
|
||||
$identHash = TransactionCreation::DRMakeStringHash($creation->state_user->email);
|
||||
$identHashes[$creation->state_user->id] = $identHash;
|
||||
}
|
||||
}*/
|
||||
|
||||
$this->set(compact('transactionCreations', 'identHashes'));
|
||||
//$this->set(compact('transactionCreations', 'identHashes'));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -125,7 +125,7 @@ class TransactionCreationsController extends AppController
|
||||
|
||||
if (count($receiverProposal) > $receiverIndex) {
|
||||
$pubKeyHex = $receiverProposal[$receiverIndex]['key'];
|
||||
$identHash = TransactionCreation::DRMakeStringHash($receiverProposal[$receiverIndex]['email']);
|
||||
//$identHash = TransactionCreation::DRMakeStringHash($receiverProposal[$receiverIndex]['email']);
|
||||
}
|
||||
$builderResult = TransactionCreation::build(
|
||||
$amountCent,
|
||||
|
||||
@ -285,7 +285,7 @@ class TransactionCreation extends TransactionBase {
|
||||
|
||||
// intval
|
||||
//$protoCreation->setIdentHash(intval($identHashBytes));
|
||||
$protoCreation->setIdentHash(self::DRMakeStringHash($stateUser->email));
|
||||
//$protoCreation->setIdentHash(self::DRMakeStringHash($stateUser->email));
|
||||
return new TransactionCreation($protoCreation);
|
||||
}
|
||||
}
|
||||
|
||||
@ -75,7 +75,8 @@ class TransactionTransfer extends TransactionBase {
|
||||
foreach($sigPairs as $sigPair) {
|
||||
//echo 'sig Pair: '; var_dump($sigPair); echo "<br>";
|
||||
$pubkey = bin2hex($sigPair->getPubKey());
|
||||
$hash = TransactionCreation::DRMakeStringHash($pubkey);
|
||||
//$hash = TransactionCreation::DRMakeStringHash($pubkey);
|
||||
$hash = $pubkey;
|
||||
if(!isset($sigPubHexs[$hash])) {
|
||||
$sigPubHexs[$hash] = [$pubkey];
|
||||
} else {
|
||||
@ -100,7 +101,8 @@ class TransactionTransfer extends TransactionBase {
|
||||
return false;
|
||||
}
|
||||
// check if signature exist for sender
|
||||
$hash = TransactionCreation::DRMakeStringHash($senderPublicHex);
|
||||
//$hash = TransactionCreation::DRMakeStringHash($senderPublicHex);
|
||||
$hash = $senderPublicHex;
|
||||
if(!isset($sigPubHexs[$hash]) || in_array($senderPublicHex, $sigPubHexs[$hash]) === FALSE) {
|
||||
$this->addError($functionName, 'missing signature for sender');
|
||||
return false;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user