Search in sources :

Example 1 with LazyECPoint

use of org.bitcoinj.crypto.LazyECPoint in project Elastos.DID.Java.SDK by elastos.

the class ECKey method fromPrivateAndPrecalculatedPublic.

/**
 * Creates an ECKey that simply trusts the caller to ensure that point is really the result of multiplying the
 * generator point by the private key. This is used to speed things up when you know you have the right values
 * already. The compression state of the point will be preserved.
 */
public static ECKey fromPrivateAndPrecalculatedPublic(byte[] priv, byte[] pub) {
    checkNotNull(priv);
    checkNotNull(pub);
    return new ECKey(new BigInteger(1, priv), new LazyECPoint(CURVE.getCurve(), pub));
}
Also used : BigInteger(java.math.BigInteger) LazyECPoint(org.bitcoinj.crypto.LazyECPoint)

Aggregations

BigInteger (java.math.BigInteger)1 LazyECPoint (org.bitcoinj.crypto.LazyECPoint)1