Package net.schmizz.sshj.common
Class ECDSAKeyFactory
- java.lang.Object
-
- net.schmizz.sshj.common.ECDSAKeyFactory
-
public class ECDSAKeyFactory extends java.lang.Object
Factory for generating Elliptic Curve Keys using Java Security components for NIST Curves
-
-
Constructor Summary
Constructors Modifier Constructor Description private
ECDSAKeyFactory()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description private static java.security.spec.ECParameterSpec
getParameterSpec(ECDSACurve ecdsaCurve)
static java.security.PrivateKey
getPrivateKey(java.math.BigInteger privateKeyInteger, ECDSACurve ecdsaCurve)
Get Elliptic Curve Private Key for private key value and Curve Namestatic java.security.PublicKey
getPublicKey(java.security.spec.ECPoint point, ECDSACurve ecdsaCurve)
Get Elliptic Curve Public Key for public key value and Curve Name
-
-
-
Method Detail
-
getPrivateKey
public static java.security.PrivateKey getPrivateKey(java.math.BigInteger privateKeyInteger, ECDSACurve ecdsaCurve) throws java.security.GeneralSecurityException
Get Elliptic Curve Private Key for private key value and Curve Name- Parameters:
privateKeyInteger
- Private KeyecdsaCurve
- Elliptic Curve- Returns:
- Elliptic Curve Private Key
- Throws:
java.security.GeneralSecurityException
- Thrown on failure to create parameter specification
-
getPublicKey
public static java.security.PublicKey getPublicKey(java.security.spec.ECPoint point, ECDSACurve ecdsaCurve) throws java.security.GeneralSecurityException
Get Elliptic Curve Public Key for public key value and Curve Name- Parameters:
point
- Public Key pointecdsaCurve
- Elliptic Curve- Returns:
- Elliptic Curve Public Key
- Throws:
java.security.GeneralSecurityException
- Thrown on failure to create parameter specification
-
getParameterSpec
private static java.security.spec.ECParameterSpec getParameterSpec(ECDSACurve ecdsaCurve) throws java.security.GeneralSecurityException
- Throws:
java.security.GeneralSecurityException
-
-