本文整理了Java中org.bouncycastle.util.Arrays.reverse()
方法的一些代码示例,展示了Arrays.reverse()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Arrays.reverse()
方法的具体详情如下:
包路径:org.bouncycastle.util.Arrays
类名称:Arrays
方法名:reverse
暂无
代码示例来源:origin: redfish64/TinyTravelTracker
private static ECFieldElement hash2FieldElement(ECCurve curve, byte[] hash)
{
byte[] data = Arrays.reverse(hash);
return curve.fromBigInteger(truncate(new BigInteger(1, data), curve.getFieldSize()));
}
代码示例来源:origin: org.bouncycastle/bcprov-debug-jdk15on
private static ECFieldElement hash2FieldElement(ECCurve curve, byte[] hash)
{
byte[] data = Arrays.reverse(hash);
return curve.fromBigInteger(truncate(new BigInteger(1, data), curve.getFieldSize()));
}
代码示例来源:origin: io.nessus/nessus-cipher
public DeterministicRandom(Address addr, Multihash cid) throws GeneralSecurityException {
AssertArgument.assertNotNull(addr.getPrivKey(), "Wallet does not control private key for: " + addr);
byte[] bytesA = addr.getPrivKey().getBytes();
byte[] bytesB = cid != null ? cid.toBytes() : Arrays.reverse(bytesA);
digest = Arrays.concatenate(md.digest(bytesA), md.digest(bytesB));
}
代码示例来源:origin: org.bouncycastle/bcprov-debug-jdk15on
public static ECField convertField(FiniteField field)
{
if (ECAlgorithms.isFpField(field))
{
return new ECFieldFp(field.getCharacteristic());
}
else //if (ECAlgorithms.isF2mField(curveField))
{
Polynomial poly = ((PolynomialExtensionField)field).getMinimalPolynomial();
int[] exponents = poly.getExponentsPresent();
int[] ks = Arrays.reverse(Arrays.copyOfRange(exponents, 1, exponents.length - 1));
return new ECFieldF2m(poly.getDegree(), ks);
}
}
代码示例来源:origin: org.bouncycastle/bcprov-debug-jdk15on
private static ECField convertField(FiniteField field)
{
if (ECAlgorithms.isFpField(field))
{
return new ECFieldFp(field.getCharacteristic());
}
else //if (ECAlgorithms.isF2mField(curveField))
{
Polynomial poly = ((PolynomialExtensionField)field).getMinimalPolynomial();
int[] exponents = poly.getExponentsPresent();
int[] ks = Arrays.reverse(Arrays.copyOfRange(exponents, 1, exponents.length - 1));
return new ECFieldF2m(poly.getDegree(), ks);
}
}
内容来源于网络,如有侵权,请联系作者删除!