Interface PrivateKeyEntryResolver
- All Known Subinterfaces:
PrivateKeyEntryDecoder<PUB,
PRV>
- All Known Implementing Classes:
AbstractPrivateKeyEntryDecoder
,OpenSSHDSSPrivateKeyEntryDecoder
,OpenSSHECDSAPrivateKeyEntryDecoder
,OpenSSHEd25519PrivateKeyEntryDecoder
,OpenSSHRSAPrivateKeyDecoder
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final PrivateKeyEntryResolver
A resolver that fails on all inputstatic final PrivateKeyEntryResolver
A resolver that ignores all input -
Method Summary
Modifier and TypeMethodDescriptionresolve
(SessionContext session, String keyType, byte[] keyData)
-
Field Details
-
IGNORING
A resolver that ignores all input -
FAILING
A resolver that fails on all input
-
-
Method Details
-
resolve
PrivateKey resolve(SessionContext session, String keyType, byte[] keyData) throws IOException, 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 data- Returns:
- The extracted
PrivateKey
- ignored ifnull
- Throws:
IOException
- If failed to parse the key dataGeneralSecurityException
- If failed to generate the key
-