public class ECUtils extends Object
Constructor and Description |
---|
ECUtils() |
Modifier and Type | Method and Description |
---|---|
static ECPublicKey |
convertKey(byte[] encodedKey) |
static ECPublicKey |
decodeJCEKey(byte[] encoded) |
static ECPublicKey |
decodeKey(byte[] encoded,
String namedCurve) |
static ECPrivateKey |
decodePrivateKey(byte[] key,
ECPublicKey pub) |
static byte[] |
ensureLeadingZero(byte[] x) |
static ECPoint |
fromByteArray(byte[] b,
EllipticCurve curve) |
static String |
getNameFromEncodedKey(PrivateKey prv) |
static byte[] |
getOidBytes(String curve) |
static byte[] |
stripLeadingZeros(byte[] b) |
static byte[] |
toByteArray(ECPoint e,
EllipticCurve curve) |
public static byte[] toByteArray(ECPoint e, EllipticCurve curve)
public static ECPoint fromByteArray(byte[] b, EllipticCurve curve)
public static byte[] ensureLeadingZero(byte[] x)
public static String getNameFromEncodedKey(PrivateKey prv)
public static ECPublicKey convertKey(byte[] encodedKey) throws InvalidKeySpecException
InvalidKeySpecException
public static ECPrivateKey decodePrivateKey(byte[] key, ECPublicKey pub) throws InvalidKeySpecException
InvalidKeySpecException
public static byte[] stripLeadingZeros(byte[] b)
public static ECPublicKey decodeKey(byte[] encoded, String namedCurve) throws IOException, InvalidKeySpecException, NoSuchAlgorithmException, InvalidAlgorithmParameterException
public static ECPublicKey decodeJCEKey(byte[] encoded) throws IOException, InvalidKeySpecException, NoSuchAlgorithmException, InvalidAlgorithmParameterException
public static byte[] getOidBytes(String curve)
Copyright © 2024. All rights reserved.