Class ECUtils
java.lang.Object
com.sshtools.common.ssh.components.jce.ECUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ECPublicKeyconvertKey(byte[] encodedKey) static ECPublicKeydecodeJCEKey(byte[] encoded) static ECPublicKeystatic ECPrivateKeydecodePrivateKey(byte[] key, ECPublicKey pub) static byte[]ensureLeadingZero(byte[] x) static ECPointfromByteArray(byte[] b, EllipticCurve curve) static Stringstatic byte[]getOidBytes(String curve) static byte[]stripLeadingZeros(byte[] b) static byte[]toByteArray(ECPoint e, EllipticCurve curve)
-
Constructor Details
-
ECUtils
public ECUtils()
-
-
Method Details
-
toByteArray
-
fromByteArray
-
ensureLeadingZero
public static byte[] ensureLeadingZero(byte[] x) -
getNameFromEncodedKey
-
convertKey
- Throws:
InvalidKeySpecException
-
decodePrivateKey
public static ECPrivateKey decodePrivateKey(byte[] key, ECPublicKey pub) throws InvalidKeySpecException - Throws:
InvalidKeySpecException
-
stripLeadingZeros
public static byte[] stripLeadingZeros(byte[] b) -
decodeKey
public static ECPublicKey decodeKey(byte[] encoded, String namedCurve) throws IOException, InvalidKeySpecException, NoSuchAlgorithmException, InvalidAlgorithmParameterException -
decodeJCEKey
public static ECPublicKey decodeJCEKey(byte[] encoded) throws IOException, InvalidKeySpecException, NoSuchAlgorithmException, InvalidAlgorithmParameterException -
getOidBytes
-