net.i2p.data.Hash.fromBase64()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(1.0k)|赞(0)|评价(0)|浏览(103)

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

Hash.fromBase64介绍

暂无

代码示例

代码示例来源:origin: i2p/i2p.i2p

private void addFromProperties() {
    for (String prop : _ctx.getPropertyNames()) {
      if (!prop.startsWith(PROP_PFX))
        continue;
      String key = _ctx.getProperty(prop);
      if (key == null || key.length() != 44)
        continue;
      String hb = prop.substring(PROP_PFX.length());
      hb = hb.replace("$", "=");
      Hash dest = new Hash();
      SessionKey sk = new SessionKey();
      try {
        dest.fromBase64(hb);
        sk.fromBase64(key);
        super.put(dest, sk);
      } catch (DataFormatException dfe) { continue; }
    }
  }
}

代码示例来源:origin: i2p/i2p.i2p

Hash peer = new Hash();
try {
  peer.fromBase64(peerStr);

代码示例来源:origin: i2p/i2p.i2p-bote

/** Thin wrapper around {@link Hash#fromBase64(String)}. */
public static Hash createHash(String hashStr) throws DataFormatException {
  Hash hash = new Hash();
  hash.fromBase64(hashStr);
  return hash;
}

相关文章