Java Code Examples for net.bither.bitherj.crypto.hd.DeterministicKey#getPubKeyExtended()

The following examples show how to use net.bither.bitherj.crypto.hd.DeterministicKey#getPubKeyExtended() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DesktopHDMKeychain.java    From bitherj with Apache License 2.0 5 votes vote down vote up
public byte[] getExternalChainRootPubExtended(CharSequence password) throws MnemonicException
        .MnemonicLengthException {
    DeterministicKey ex = externalChainRoot(password);
    byte[] pub = ex.getPubKeyExtended();
    ex.wipe();
    return pub;
}
 
Example 2
Source File: HDMKeychain.java    From bitherj with Apache License 2.0 5 votes vote down vote up
public byte[] getExternalChainRootPubExtended(CharSequence password) throws MnemonicException
        .MnemonicLengthException {
    DeterministicKey ex = externalChainRoot(password);
    byte[] pub = ex.getPubKeyExtended();
    ex.wipe();
    return pub;
}
 
Example 3
Source File: EnterpriseHDMSeed.java    From bitherj with Apache License 2.0 5 votes vote down vote up
public byte[] getExternalRootPubExtended(CharSequence password) throws MnemonicException
        .MnemonicLengthException {
    DeterministicKey master = masterKey(password);
    DeterministicKey accountKey = getAccount(master);
    DeterministicKey externalChainRoot = getChainRootKey(accountKey, PathType
            .EXTERNAL_ROOT_PATH);
    master.wipe();
    accountKey.wipe();
    byte[] ext = externalChainRoot.getPubKeyExtended();
    externalChainRoot.clearPrivateKey();
    externalChainRoot.clearChainCode();
    return ext;
}
 
Example 4
Source File: HDAccountCold.java    From bitherj with Apache License 2.0 5 votes vote down vote up
public byte[] accountPubExtended(CharSequence password) throws MnemonicException
        .MnemonicLengthException {
    DeterministicKey master = masterKey(password);
    DeterministicKey account = getAccount(master);
    byte[] extended = account.getPubKeyExtended();
    master.wipe();
    account.wipe();
    return extended;
}
 
Example 5
Source File: HDMSingular.java    From bitherj with Apache License 2.0 4 votes vote down vote up
private void initColdFirst() {
    DeterministicKey coldEx = rootFromMnemonic(coldMnemonicSeed);
    coldRoot = coldEx.getPubKeyExtended();
    coldFirst = coldEx.deriveSoftened(0);
    coldEx.wipe();
}