mirror of
https://github.com/eosswedenorg/antelope-keygen
synced 2026-06-17 03:50:03 +02:00
gui: implement support for K1 keys.
This commit is contained in:
parent
e18886e074
commit
9ed6e6ab80
6 changed files with 73 additions and 27 deletions
|
|
@ -92,14 +92,16 @@ m_btn_copy_both ("Copy keys")
|
|||
|
||||
void GenerateWindow::generate_key()
|
||||
{
|
||||
std::string pubstr;
|
||||
std::string pubstr, pvtstr;
|
||||
struct libeosio::ec_keypair pair;
|
||||
const libeosio::wif_codec_t& codec = Settings::getKeyCodec();
|
||||
|
||||
libeosio::ec_generate_key(&pair);
|
||||
|
||||
pubstr = libeosio::wif_pub_encode(pair.pub, Settings::shouldGenerateFioKeys() ? "FIO" : "EOS");
|
||||
pubstr = libeosio::wif_pub_encode(pair.pub, codec.pub);
|
||||
pvtstr = libeosio::wif_priv_encode(pair.secret, codec.pvt);
|
||||
m_pub.setText(QString::fromStdString(pubstr));
|
||||
m_priv.setText(QString::fromStdString(libeosio::wif_priv_encode(pair.secret)));
|
||||
m_priv.setText(QString::fromStdString(pvtstr));
|
||||
}
|
||||
|
||||
void GenerateWindow::copy_both_keys()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue