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