This is useful for the CLI/GUI to accept KeyPair objects to use in any asymmetric operations. Otherwise, we have to copy and paste public/private key values which is possible but cumbersome. Here's an example of where we ultimately want to end up after solving issue #21 using the capycrypt CLI to generate KeyPair objects:
This is useful for the CLI/GUI to accept KeyPair objects to use in any asymmetric operations. Otherwise, we have to copy and paste public/private key values which is possible but cumbersome. Here's an example of where we ultimately want to end up after solving issue #21 using the capycrypt CLI to generate KeyPair objects:
To achieve this, we only need to make a few changes: In cargo.toml: Add the following:
Then, in
lib.rs
whereKeyPair
is defined, we need to make the following modifcations:Finally, to write the KeyPair to a JSON, do the following:
That's it for this issue!