Interface PublicKeyRawDataDecoder<PUB extends PublicKey>
-
- Type Parameters:
PUB
- GenericPublicKey
type
- All Known Subinterfaces:
PublicKeyEntryDecoder<PUB,PRV>
- All Known Implementing Classes:
AbstractPublicKeyEntryDecoder
,DSSPublicKeyEntryDecoder
,ECDSAPublicKeyEntryDecoder
,Ed25519PublicKeyDecoder
,RSAPublicKeyDecoder
,Ssh2PublicKeyEntryDecoder
public interface PublicKeyRawDataDecoder<PUB extends PublicKey>
- Author:
- Apache MINA SSHD Project
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default PUB
decodePublicKey(SessionContext session, String keyType, byte[] keyData, int offset, int length, Map<String,String> headers)
default PUB
decodePublicKey(SessionContext session, String keyType, byte[] keyData, Map<String,String> headers)
PUB
decodePublicKey(SessionContext session, String keyType, InputStream keyData, Map<String,String> headers)
PUB
decodePublicKeyByType(SessionContext session, String keyType, InputStream keyData, Map<String,String> headers)
-
-
-
Method Detail
-
decodePublicKey
default PUB decodePublicKey(SessionContext session, String keyType, byte[] keyData, Map<String,String> headers) throws IOException, GeneralSecurityException
- Parameters:
session
- TheSessionContext
for invoking this command - may benull
if not invoked within a session context (e.g., offline tool or session unknown).keyType
- TheOpenSSH
reported key typekeyData
- The key data bytes inOpenSSH
format (after BASE64 decoding) - ignored ifnull
/emptyheaders
- Any headers that may have been available when data was read- Returns:
- The decoded
PublicKey
- ornull
if no data - Throws:
IOException
- If failed to decode the keyGeneralSecurityException
- If failed to generate the key
-
decodePublicKey
default PUB decodePublicKey(SessionContext session, String keyType, byte[] keyData, int offset, int length, Map<String,String> headers) throws IOException, GeneralSecurityException
- Throws:
IOException
GeneralSecurityException
-
decodePublicKeyByType
PUB decodePublicKeyByType(SessionContext session, String keyType, InputStream keyData, Map<String,String> headers) throws IOException, GeneralSecurityException
- Throws:
IOException
GeneralSecurityException
-
decodePublicKey
PUB decodePublicKey(SessionContext session, String keyType, InputStream keyData, Map<String,String> headers) throws IOException, GeneralSecurityException
- Parameters:
session
- TheSessionContext
for invoking this command - may benull
if not invoked within a session context (e.g., offline tool or session unknown).keyType
- The reported / encode key typekeyData
- The key data bytes stream positioned after the key type decoding and making sure it is one of the supported typesheaders
- Any headers that may have been available when data was read- Returns:
- The decoded
PublicKey
- Throws:
IOException
- If failed to read from the data streamGeneralSecurityException
- If failed to generate the key
-
-