本文整理了Java中org.web3j.utils.Numeric.toHexStringWithPrefixZeroPadded()
方法的一些代码示例,展示了Numeric.toHexStringWithPrefixZeroPadded()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Numeric.toHexStringWithPrefixZeroPadded()
方法的具体详情如下:
包路径:org.web3j.utils.Numeric
类名称:Numeric
方法名:toHexStringWithPrefixZeroPadded
暂无
代码示例来源:origin: web3j/web3j
@Override
public String toString() {
return Numeric.toHexStringWithPrefixZeroPadded(
value.getValue(), LENGTH_IN_HEX);
}
代码示例来源:origin: web3j/web3j
public static String getAddress(BigInteger publicKey) {
return getAddress(
Numeric.toHexStringWithPrefixZeroPadded(publicKey, PUBLIC_KEY_LENGTH_IN_HEX));
}
代码示例来源:origin: web3j/web3j
@Test
public void testToHexStringWithPrefixZeroPadded() {
assertThat(
Numeric.toHexStringWithPrefixZeroPadded(
BigInteger.ZERO,
5),
is("0x00000"));
assertThat(
Numeric.toHexStringWithPrefixZeroPadded(
new BigInteger("01c52b08330e05d731e38c856c1043288f7d9744", 16),
40),
is("0x01c52b08330e05d731e38c856c1043288f7d9744"));
assertThat(
Numeric.toHexStringWithPrefixZeroPadded(
new BigInteger("01c52b08330e05d731e38c856c1043288f7d9744", 16),
40),
is("0x01c52b08330e05d731e38c856c1043288f7d9744"));
}
代码示例来源:origin: org.web3j/abi
@Override
public String toString() {
return Numeric.toHexStringWithPrefixZeroPadded(
value.getValue(), LENGTH_IN_HEX);
}
代码示例来源:origin: io.daonomic.scalether/util
public static String getAddress(BigInteger publicKey) {
return getAddress(
Numeric.toHexStringWithPrefixZeroPadded(publicKey, PUBLIC_KEY_LENGTH_IN_HEX));
}
代码示例来源:origin: org.web3j/crypto
public static String getAddress(BigInteger publicKey) {
return getAddress(
Numeric.toHexStringWithPrefixZeroPadded(publicKey, PUBLIC_KEY_LENGTH_IN_HEX));
}
内容来源于网络,如有侵权,请联系作者删除!