Skip to content

Commit

Permalink
fixed privateKey length;
Browse files Browse the repository at this point in the history
  • Loading branch information
grkamil committed Jul 8, 2018
1 parent 0c69093 commit 181114c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/BIP/HDKey.php
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ public function generateKeysFromPrivate(string $privateKey): void
throw new \Exception('Invalid private key');
}

$this->data['privateKey'] = $privateKey;
$this->data['privateKey'] = str_repeat('0', 64 - strlen($privateKey)) . $privateKey;
$this->data['publicKey'] = $this->getPublicKeyFromPrivate($privateKey);
$this->data['fingerprint'] = $this->computeFingerprint($this->data['publicKey']);
}
Expand Down

0 comments on commit 181114c

Please sign in to comment.