Skip to content

Commit

Permalink
added return value from uncloak()
Browse files Browse the repository at this point in the history
  • Loading branch information
deemru committed Nov 27, 2023
1 parent b9274ca commit 5a76166
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Cloaked.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ public function cloak( &$data, $variant = null )
*
* @param callable $function Function to be used with sensitive data
* @param string|null $variant Variant of sensitive data (default: null)
*
* @return mixed Any return value function returns
*/
public function uncloak( $function, $variant = null )
{
Expand All @@ -71,8 +73,9 @@ public function uncloak( $function, $variant = null )
$data = str_pad( '', $n, ' ' );
for( $i = 0; $i < $n; ++$i )
$data[$i] = $this->cloakBytes[$cloaked[$i]];
$function( $data );
$result = $function( $data );
$this->used( $data );
return $result;
}

/**
Expand Down

0 comments on commit 5a76166

Please sign in to comment.