Skip to content

Commit

Permalink
k so public key depends on private key…😳
Browse files Browse the repository at this point in the history
  • Loading branch information
mxcl committed Nov 27, 2024
1 parent 0dec44d commit e603fd9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion bpb/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,11 @@ fn generate_keypair(userid: String) -> Result<(), Error> {

fn print_public_key() -> Result<(), Error> {
let config = Config::load()?;
let secret = [0u8; 32];
let service = "xyz.tea.BASE.bpb";
let account = config.user_id();
let secret_str = get_keychain_item(service, account)?;
let secret = to_32_bytes(&secret_str)?;

let keypair = KeyData::load(&config, secret)?;
println!("{}", keypair.public());
Ok(())
Expand Down

0 comments on commit e603fd9

Please sign in to comment.