@@ -52,14 +52,14 @@ discard block |
||
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), |
|
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), |
|
61 | - 'generation_time' => '', |
|
62 | - ); |
|
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 | + '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), |
|
61 | + 'generation_time' => '', |
|
62 | + ); |
|
63 | 63 | } |
64 | 64 | |
65 | 65 | /** |
@@ -120,13 +120,13 @@ discard block |
||
120 | 120 | $comp_prefix = ($this->Modulo($point['R']['y'], '2') == '1') ? '03' : '02'; |
121 | 121 | |
122 | 122 | $this->keyInfo = array( |
123 | - 'private_key_hex' => $this->encodeHex($point['random_number']), |
|
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'], |
|
127 | - 'public_key_x' => $point['Rx_hex'], |
|
128 | - 'public_key_y' => $point['Ry_hex'], |
|
129 | - ); |
|
123 | + 'private_key_hex' => $this->encodeHex($point['random_number']), |
|
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'], |
|
127 | + 'public_key_x' => $point['Rx_hex'], |
|
128 | + 'public_key_y' => $point['Ry_hex'], |
|
129 | + ); |
|
130 | 130 | |
131 | 131 | return $this->keyInfo; |
132 | 132 | } |