public Bip32HDKeyManager() {
   keys.put(
       new int[] {},
       new EncryptedDeterministicKey(
           HDKeyDerivation.createMasterPrivateKey(Random.get_bytes(16))));
   set_has_private_keys(true);
   set_password_protected(false);
 }
Пример #2
0
 DeterministicKeyChain(DeterministicSeed seed, @Nullable KeyCrypter crypter) {
   this.seed = seed;
   basicKeyChain = new BasicKeyChain(crypter);
   if (!seed.isEncrypted()) {
     rootKey = HDKeyDerivation.createMasterPrivateKey(checkNotNull(seed.getSeedBytes()));
     rootKey.setCreationTimeSeconds(seed.getCreationTimeSeconds());
     initializeHierarchyUnencrypted(rootKey);
   }
   // Else...
   // We can't initialize ourselves with just an encrypted seed, so we expected deserialization
   // code to do the
   // rest of the setup (loading the root key).
 }