org.bitcoinj.core.Utils.join()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(3.9k)|赞(0)|评价(0)|浏览(135)

本文整理了Java中org.bitcoinj.core.Utils.join()方法的一些代码示例,展示了Utils.join()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Utils.join()方法的具体详情如下:
包路径:org.bitcoinj.core.Utils
类名称:Utils
方法名:join

Utils.join介绍

[英]Returns a string containing the string representation of the given items, delimited by a single space character.
[中]返回一个字符串,该字符串包含给定项的字符串表示形式,由单个空格字符分隔。

代码示例

代码示例来源:origin: cash.bitcoinj/bitcoinj-core

@Override
  public String toString() {
    return "addr: " + Utils.join(addresses);
  }
}

代码示例来源:origin: greenaddress/GreenBits

@Override
  public String toString() {
    return "addr: " + Utils.join(addresses);
  }
}

代码示例来源:origin: cash.bitcoinj/bitcoinj-core

/**
 * Returns the program opcodes as a string, for example "[1234] DUP HASH160"
 */
@Override
public String toString() {
  return Utils.join(chunks);
}

代码示例来源:origin: HashEngineering/dashj

@Override
public String toString() {
  return "getblocks: " + Utils.join(locator);
}

代码示例来源:origin: HashEngineering/dashj

@Override
public String toString() {
  return "getheaders: " + Utils.join(locator);
}

代码示例来源:origin: HashEngineering/dashj

/**
 * Returns the program opcodes as a string, for example "[1234] DUP HASH160"
 */
@Override
public String toString() {
  return Utils.join(chunks);
}

代码示例来源:origin: greenaddress/GreenBits

/**
 * Returns the program opcodes as a string, for example "[1234] DUP HASH160"
 */
@Override
public String toString() {
  return Utils.join(chunks);
}

代码示例来源:origin: HashEngineering/dashj

@Override
  public String toString() {
    return "addr: " + Utils.join(addresses);
  }
}

代码示例来源:origin: cash.bitcoinj/bitcoinj-core

@Override
public String toString() {
  return "getheaders: " + Utils.join(locator);
}

代码示例来源:origin: greenaddress/GreenBits

@Override
public String toString() {
  return "getheaders: " + Utils.join(locator);
}

代码示例来源:origin: cash.bitcoinj/bitcoinj-core

@Override
public String toString() {
  return "getblocks: " + Utils.join(locator);
}

代码示例来源:origin: greenaddress/GreenBits

@Override
public String toString() {
  return "getblocks: " + Utils.join(locator);
}

代码示例来源:origin: cash.bitcoinj/bitcoinj-core

private byte[] getMnemonicAsBytes() {
  return Utils.join(mnemonicCode).getBytes(Charsets.UTF_8);
}

代码示例来源:origin: greenaddress/GreenBits

private byte[] getMnemonicAsBytes() {
  return Utils.join(mnemonicCode).getBytes(Charsets.UTF_8);
}

代码示例来源:origin: HashEngineering/dashj

private byte[] getMnemonicAsBytes() {
  return Utils.join(mnemonicCode).getBytes(Charsets.UTF_8);
}

代码示例来源:origin: cash.bitcoinj/bitcoinj-core

@Override
public String toString() {
  return isEncrypted()
    ? "DeterministicSeed [encrypted]"
    : "DeterministicSeed " + toHexString() + " " + Utils.join(mnemonicCode);
}

代码示例来源:origin: greenaddress/GreenBits

@Override
public String toString() {
  return isEncrypted()
    ? "DeterministicSeed [encrypted]"
    : "DeterministicSeed " + toHexString() + " " + Utils.join(mnemonicCode);
}

代码示例来源:origin: HashEngineering/dashj

@Override
public String toString() {
  return isEncrypted()
    ? "DeterministicSeed [encrypted]"
    : "DeterministicSeed " + toHexString() + " " + Utils.join(mnemonicCode);
}

代码示例来源:origin: HashEngineering/dashj

public static void main(String[] args) {

    NetworkParameters params = TestNet3Params.get();
    Wallet wallet = new Wallet(params);

    DeterministicSeed seed = wallet.getKeyChainSeed();
    System.out.println("seed: " + seed.toString());

    System.out.println("creation time: " + seed.getCreationTimeSeconds());
    System.out.println("mnemonicCode: " + Utils.join(seed.getMnemonicCode()));
  }
}

代码示例来源:origin: greenaddress/GreenBits

@Test
public void testVectors() throws Exception {
  for (int ii = 0; ii < vectors.length; ii += 3) {
    String vecData = vectors[ii];
    String vecCode = vectors[ii+1];
    String vecSeed = vectors[ii+2];
    List<String> code = mc.toMnemonic(HEX.decode(vecData));
    byte[] seed = MnemonicCode.toSeed(code, "TREZOR");
    byte[] entropy = mc.toEntropy(split(vecCode));
    assertEquals(vecData, HEX.encode(entropy));
    assertEquals(vecCode, Utils.join(code));
    assertEquals(vecSeed, HEX.encode(seed));
  }
}

相关文章