Ledger Nano X - The secure hardware wallet
SHARE
TWEET

Untitled

a guest Apr 10th, 2020 173 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. fn generate_keys_from_master_password(tree: &SecretTree) -> Keys {
  2.     let mut buffer = [0_u8; 32];
  3.  
  4.     tree.child(Name::new("consensus")).fill(&mut buffer);
  5.     let seed = Seed::new(buffer);
  6.     let consensus_keys = KeyPair::from_seed(&seed);
  7.  
  8.     tree.child(Name::new("service")).fill(&mut buffer);
  9.     let seed = Seed::new(buffer);
  10.     let service_keys = KeyPair::from_seed(&seed);
  11.  
  12.     tree.child(Name::new("handshake")).fill(&mut buffer);
  13.     let seed = Seed::new(buffer);
  14.     let handshake_keys = HandhakeKeys::from_seed(&seed);
  15.  
  16.     Keys::from_keys(consensus_keys, service_keys, handshake_keys)
  17. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top