当前位置: 首页>>代码示例>>Java>>正文


Java FixedPointCombMultiplier类代码示例

本文整理汇总了Java中org.spongycastle.math.ec.FixedPointCombMultiplier的典型用法代码示例。如果您正苦于以下问题:Java FixedPointCombMultiplier类的具体用法?Java FixedPointCombMultiplier怎么用?Java FixedPointCombMultiplier使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


FixedPointCombMultiplier类属于org.spongycastle.math.ec包,在下文中一共展示了FixedPointCombMultiplier类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: publicPointFromPrivate

import org.spongycastle.math.ec.FixedPointCombMultiplier; //导入依赖的package包/类
/**
 * 根据私匙计算公匙
 *
 * @param privKey
 * @return ECKey
 */
public static ECPoint publicPointFromPrivate(BigInteger privKey) {
    if (privKey.bitLength() > CURVE.getN().bitLength()) {
        privKey = privKey.mod(CURVE.getN());
    }
    return new FixedPointCombMultiplier().multiply(CURVE.getG(), privKey);
}
 
开发者ID:nuls-io,项目名称:nuls,代码行数:13,代码来源:ECKey.java

示例2: publicPointFromPrivate

import org.spongycastle.math.ec.FixedPointCombMultiplier; //导入依赖的package包/类
/**
 * Returns public key point from the given private key. To convert a byte array into a BigInteger, use <tt>
 * new BigInteger(1, bytes);</tt>
 */
public static ECPoint publicPointFromPrivate(BigInteger privKey) {
    /*
     * TODO: FixedPointCombMultiplier currently doesn't support scalars longer than the group order,
     * but that could change in future versions.
     */
    if (privKey.bitLength() > CURVE.getN().bitLength()) {
        privKey = privKey.mod(CURVE.getN());
    }
    return new FixedPointCombMultiplier().multiply(CURVE.getG(), privKey);
}
 
开发者ID:creativechain,项目名称:creacoinj,代码行数:15,代码来源:ECKey.java

示例3: publicPointFromPrivate

import org.spongycastle.math.ec.FixedPointCombMultiplier; //导入依赖的package包/类
/**
 * Returns public key point from the given private key. To convert a byte
 * array into a BigInteger, use <tt>
 * new BigInteger(1, bytes);</tt>
 */
public static ECPoint publicPointFromPrivate(BigInteger privKey) {
    /*
     * TODO: FixedPointCombMultiplier currently doesn't support scalars
     * longer than the group order, but that could change in future
     * versions.
     */
    if (privKey.bitLength() > CURVE.getN().bitLength()) {
        privKey = privKey.mod(CURVE.getN());
    }
    return new FixedPointCombMultiplier().multiply(CURVE.getG(), privKey);
}
 
开发者ID:marvin-we,项目名称:crypto-core,代码行数:17,代码来源:ECKey.java


注:本文中的org.spongycastle.math.ec.FixedPointCombMultiplier类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。