public class CryptoUtils extends Object
| 构造器和说明 |
|---|
CryptoUtils() |
| 限定符和类型 | 方法和说明 |
|---|---|
static byte[] |
Asn1MalformedIntProcess(byte[] octets)
Reference: ITU-T X.690 - 8.3.2
8.3.2 If the contents octets of an integer value encoding consist of more than one octet, then the bits of the first
octet and bit 8 of the second octet:
a) shall not all be ones; and
b) shall not all be zero.
|
static byte[] |
getPubkeyFp(byte[] pubkey)
Compute public key fingerprint
|
static byte[] |
getPubkeyFp(byte[] pubkey,
HashTypeEnum hashTypeEnum)
Compute public key fingerprint
|
static void |
initMaxKeySize()
Some JDK version will throw "Illegal key size"
|
static org.bouncycastle.math.ec.ECPoint |
publicPointFromPrivate(org.bouncycastle.crypto.params.ECDomainParameters curve,
BigInteger privKey)
Returns public key point from the given private key.
|
static org.bouncycastle.math.ec.ECPoint |
publicPointFromPrivate(String curveName,
BigInteger privKey)
Returns public key point from the given private key.
|
public static org.bouncycastle.math.ec.ECPoint publicPointFromPrivate(org.bouncycastle.crypto.params.ECDomainParameters curve,
BigInteger privKey)
curve - privKey - public static org.bouncycastle.math.ec.ECPoint publicPointFromPrivate(String curveName, BigInteger privKey)
curveName - privKey - public static byte[] getPubkeyFp(byte[] pubkey)
pubkey - public static byte[] getPubkeyFp(byte[] pubkey,
HashTypeEnum hashTypeEnum)
pubkey - public static void initMaxKeySize()
public static byte[] Asn1MalformedIntProcess(byte[] octets)
octets - (possible malformed integer)Copyright © 2022. All rights reserved.