|
@@ -52,12 +52,12 @@ discard block |
|
|
block discarded – undo |
|
52
|
52
|
$params = $params ?? []; |
|
53
|
53
|
|
|
54
|
54
|
$this->keyInfo = array( |
|
55
|
|
- 'private_key_hex' => $this->keyValueCheck($params['private_key_hex'] ?? null), |
|
56
|
|
- 'private_key_dec' => $this->keyValueCheck($params['private_key_dec'] ?? null), |
|
57
|
|
- 'public_key' => $this->keyValueCheck($params['public_key'] ?? null), |
|
|
55
|
+ 'private_key_hex' => $this->keyValueCheck($params['private_key_hex'] ?? null), |
|
|
56
|
+ 'private_key_dec' => $this->keyValueCheck($params['private_key_dec'] ?? null), |
|
|
57
|
+ 'public_key' => $this->keyValueCheck($params['public_key'] ?? null), |
|
58
|
58
|
'public_key_compressed' => $this->keyValueCheck($params['public_key_compressed'] ?? null), |
|
59
|
|
- 'public_key_x' => $this->keyValueCheck($params['public_key_x'] ?? null), |
|
60
|
|
- 'public_key_y' => $this->keyValueCheck($params['public_key_y'] ?? null), |
|
|
59
|
+ 'public_key_x' => $this->keyValueCheck($params['public_key_x'] ?? null), |
|
|
60
|
+ 'public_key_y' => $this->keyValueCheck($params['public_key_y'] ?? null), |
|
61
|
61
|
'generation_time' => '', |
|
62
|
62
|
); |
|
63
|
63
|
} |
|
@@ -122,8 +122,8 @@ discard block |
|
|
block discarded – undo |
|
122
|
122
|
$this->keyInfo = array( |
|
123
|
123
|
'private_key_hex' => $this->encodeHex($point['random_number']), |
|
124
|
124
|
'private_key_dec' => $point['random_number'], |
|
125
|
|
- 'public_key' => '04' . $point['Rx_hex'] . $point['Ry_hex'], |
|
126
|
|
- 'public_key_compressed' => $comp_prefix . $point['Rx_hex'], |
|
|
125
|
+ 'public_key' => '04'.$point['Rx_hex'].$point['Ry_hex'], |
|
|
126
|
+ 'public_key_compressed' => $comp_prefix.$point['Rx_hex'], |
|
127
|
127
|
'public_key_x' => $point['Rx_hex'], |
|
128
|
128
|
'public_key_y' => $point['Ry_hex'], |
|
129
|
129
|
); |
|
@@ -160,7 +160,7 @@ discard block |
|
|
block discarded – undo |
|
160
|
160
|
$pointX = substr($pubkey, 2); |
|
161
|
161
|
$pointY = substr($this->calcYfromX($pointX, $prefix), 2); |
|
162
|
162
|
|
|
163
|
|
- $parsedValue = $this->prepAndClean($pointX . $pointY); |
|
|
163
|
+ $parsedValue = $this->prepAndClean($pointX.$pointY); |
|
164
|
164
|
|
|
165
|
165
|
return ($returnHex === false) ? $parsedValue : $this->encodeHex($parsedValue); |
|
166
|
166
|
} |