Interface PublicKeyRawDataDecoder<PUB extends java.security.PublicKey>
-
- Type Parameters:
PUB
- GenericPublicKey
type
- All Known Subinterfaces:
PublicKeyEntryDecoder<PUB,PRV>
- All Known Implementing Classes:
AbstractPublicKeyEntryDecoder
,DSSPublicKeyEntryDecoder
,ECDSAPublicKeyEntryDecoder
,Ed25519PublicKeyDecoder
,OpenSSHCertificateDecoder
,RSAPublicKeyDecoder
,SkECDSAPublicKeyEntryDecoder
,SkED25519PublicKeyEntryDecoder
,Ssh2PublicKeyEntryDecoder
public interface PublicKeyRawDataDecoder<PUB extends java.security.PublicKey>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default PUB
decodePublicKey(SessionContext session, java.lang.String keyType, byte[] keyData, int offset, int length, java.util.Map<java.lang.String,java.lang.String> headers)
default PUB
decodePublicKey(SessionContext session, java.lang.String keyType, byte[] keyData, java.util.Map<java.lang.String,java.lang.String> headers)
PUB
decodePublicKey(SessionContext session, java.lang.String keyType, java.io.InputStream keyData, java.util.Map<java.lang.String,java.lang.String> headers)
PUB
decodePublicKeyByType(SessionContext session, java.lang.String keyType, java.io.InputStream keyData, java.util.Map<java.lang.String,java.lang.String> headers)
-
-
-
Method Detail
-
decodePublicKey
default PUB decodePublicKey(SessionContext session, java.lang.String keyType, byte[] keyData, java.util.Map<java.lang.String,java.lang.String> headers) throws java.io.IOException, java.security.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:
java.io.IOException
- If failed to decode the keyjava.security.GeneralSecurityException
- If failed to generate the key
-
decodePublicKey
default PUB decodePublicKey(SessionContext session, java.lang.String keyType, byte[] keyData, int offset, int length, java.util.Map<java.lang.String,java.lang.String> headers) throws java.io.IOException, java.security.GeneralSecurityException
- Throws:
java.io.IOException
java.security.GeneralSecurityException
-
decodePublicKeyByType
PUB decodePublicKeyByType(SessionContext session, java.lang.String keyType, java.io.InputStream keyData, java.util.Map<java.lang.String,java.lang.String> headers) throws java.io.IOException, java.security.GeneralSecurityException
- Throws:
java.io.IOException
java.security.GeneralSecurityException
-
decodePublicKey
PUB decodePublicKey(SessionContext session, java.lang.String keyType, java.io.InputStream keyData, java.util.Map<java.lang.String,java.lang.String> headers) throws java.io.IOException, java.security.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:
java.io.IOException
- If failed to read from the data streamjava.security.GeneralSecurityException
- If failed to generate the key
-
-