Package org.bouncycastle.jcajce.spec
Class OpenSSHPublicKeySpec
- java.lang.Object
-
- java.security.spec.EncodedKeySpec
-
- org.bouncycastle.jcajce.spec.OpenSSHPublicKeySpec
-
- All Implemented Interfaces:
KeySpec
- Direct Known Subclasses:
OpenSSHPublicKeySpec
public class OpenSSHPublicKeySpec extends EncodedKeySpec
Holds an OpenSSH encoded public key.
-
-
Constructor Summary
Constructors Constructor Description OpenSSHPublicKeySpec(byte[] encodedKey)
Construct and instance and determine the OpenSSH public key type.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getFormat()
String
getType()
The type of OpenSSH public key.-
Methods inherited from class java.security.spec.EncodedKeySpec
getAlgorithm, getEncoded
-
-
-
-
Constructor Detail
-
OpenSSHPublicKeySpec
public OpenSSHPublicKeySpec(byte[] encodedKey)
Construct and instance and determine the OpenSSH public key type. The current types are ssh-rsa, ssh-ed25519, ssh-dss and ecdsa-*It does not validate the key beyond identifying the type.
- Parameters:
encodedKey
-
-
-
Method Detail
-
getFormat
public String getFormat()
- Specified by:
getFormat
in classEncodedKeySpec
-
getType
public String getType()
The type of OpenSSH public key.- Returns:
- the type.
-
-