Interface PublicKeyEntryResolver
-
- All Known Subinterfaces:
PublicKeyEntryDecoder<PUB,PRV>
- All Known Implementing Classes:
AbstractPublicKeyEntryDecoder
,DSSPublicKeyEntryDecoder
,ECDSAPublicKeyEntryDecoder
,Ed25519PublicKeyDecoder
,RSAPublicKeyDecoder
,Ssh2PublicKeyEntryDecoder
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface PublicKeyEntryResolver
-
-
Field Summary
Fields Modifier and Type Field Description static PublicKeyEntryResolver
FAILING
A resolver that fails on all inputstatic PublicKeyEntryResolver
IGNORING
A resolver that ignores all input
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.security.PublicKey
resolve(SessionContext session, java.lang.String keyType, byte[] keyData, java.util.Map<java.lang.String,java.lang.String> headers)
-
-
-
Field Detail
-
IGNORING
static final PublicKeyEntryResolver IGNORING
A resolver that ignores all input
-
FAILING
static final PublicKeyEntryResolver FAILING
A resolver that fails on all input
-
-
Method Detail
-
resolve
java.security.PublicKey resolve(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 load command - may benull
if not invoked within a session context (e.g., offline tool or session unknown).keyType
- TheOpenSSH
reported key typekeyData
- TheOpenSSH
encoded key dataheaders
- Any headers that may have been available when data was read- Returns:
- The extracted
PublicKey
- ignored ifnull
- Throws:
java.io.IOException
- If failed to parse the key datajava.security.GeneralSecurityException
- If failed to generate the key
-
-