Class ECDSAKeyFactory
java.lang.Object
net.schmizz.sshj.common.ECDSAKeyFactory
Factory for generating Elliptic Curve Keys using Java Security components for NIST Curves
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static ECParameterSpecgetParameterSpec(ECDSACurve ecdsaCurve) static PrivateKeygetPrivateKey(BigInteger privateKeyInteger, ECDSACurve ecdsaCurve) Get Elliptic Curve Private Key for private key value and Curve Namestatic PublicKeygetPublicKey(ECPoint point, ECDSACurve ecdsaCurve) Get Elliptic Curve Public Key for public key value and Curve Name
-
Constructor Details
-
ECDSAKeyFactory
private ECDSAKeyFactory()
-
-
Method Details
-
getPrivateKey
public static PrivateKey getPrivateKey(BigInteger privateKeyInteger, ECDSACurve ecdsaCurve) throws 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:
GeneralSecurityException- Thrown on failure to create parameter specification
-
getPublicKey
public static PublicKey getPublicKey(ECPoint point, ECDSACurve ecdsaCurve) throws 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:
GeneralSecurityException- Thrown on failure to create parameter specification
-
getParameterSpec
private static ECParameterSpec getParameterSpec(ECDSACurve ecdsaCurve) throws GeneralSecurityException - Throws:
GeneralSecurityException
-