detkey = new DeterministicKey(immutablePath, chainCode, pubkey, priv, parent); } else { if (key.hasEncryptedData()) { Protos.EncryptedData proto = key.getEncryptedData(); EncryptedData data = new EncryptedData(proto.getInitialisationVector().toByteArray(),
List<String> mnemonic = Splitter.on(" ").splitToList(key.getSecretBytes().toStringUtf8()); seed = new DeterministicSeed(new byte[16], mnemonic, 0); } else if (key.hasEncryptedData()) { EncryptedData data = new EncryptedData(key.getEncryptedData().getInitialisationVector().toByteArray(), key.getEncryptedData().getEncryptedPrivateKey().toByteArray());
public Builder mergeFrom(com.openwallet.core.protos.Protos.Key other) { if (other == com.openwallet.core.protos.Protos.Key.getDefaultInstance()) return this; if (other.hasType()) { setType(other.getType()); } if (other.hasSecretBytes()) { setSecretBytes(other.getSecretBytes()); } if (other.hasEncryptedData()) { mergeEncryptedData(other.getEncryptedData()); } if (other.hasPublicKey()) { setPublicKey(other.getPublicKey()); } if (other.hasLabel()) { bitField0_ |= 0x00000010; label_ = other.label_; onChanged(); } if (other.hasDeterministicKey()) { mergeDeterministicKey(other.getDeterministicKey()); } this.mergeUnknownFields(other.getUnknownFields()); return this; }
public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; if (!hasType()) { memoizedIsInitialized = 0; return false; } if (hasEncryptedData()) { if (!getEncryptedData().isInitialized()) { memoizedIsInitialized = 0; return false; } } if (hasDeterministicKey()) { if (!getDeterministicKey().isInitialized()) { memoizedIsInitialized = 0; return false; } } memoizedIsInitialized = 1; return true; }