Interface PublicKeyRawDataDecoder<PUB extends PublicKey>
-
- Type Parameters:
PUB- GenericPublicKeytype
- All Known Subinterfaces:
PublicKeyEntryDecoder<PUB,PRV>
- All Known Implementing Classes:
AbstractPublicKeyEntryDecoder,DSSPublicKeyEntryDecoder,ECDSAPublicKeyEntryDecoder,Ed25519PublicKeyDecoder,OpenSSHCertificateDecoder,RSAPublicKeyDecoder,SkECDSAPublicKeyEntryDecoder,SkED25519PublicKeyEntryDecoder,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 PUBdecodePublicKey(SessionContext session, String keyType, byte[] keyData, int offset, int length, Map<String,String> headers)default PUBdecodePublicKey(SessionContext session, String keyType, byte[] keyData, Map<String,String> headers)PUBdecodePublicKey(SessionContext session, String keyType, InputStream keyData, Map<String,String> headers)PUBdecodePublicKeyByType(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- TheSessionContextfor invoking this command - may benullif not invoked within a session context (e.g., offline tool or session unknown).keyType- TheOpenSSHreported key typekeyData- The key data bytes inOpenSSHformat (after BASE64 decoding) - ignored ifnull/emptyheaders- Any headers that may have been available when data was read- Returns:
- The decoded
PublicKey- ornullif 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:
IOExceptionGeneralSecurityException
-
decodePublicKeyByType
PUB decodePublicKeyByType(SessionContext session, String keyType, InputStream keyData, Map<String,String> headers) throws IOException, GeneralSecurityException
- Throws:
IOExceptionGeneralSecurityException
-
decodePublicKey
PUB decodePublicKey(SessionContext session, String keyType, InputStream keyData, Map<String,String> headers) throws IOException, GeneralSecurityException
- Parameters:
session- TheSessionContextfor invoking this command - may benullif 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
-
-