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.
@FunctionalInterface public interface PrivateKeyEntryResolver
-
-
Field Summary
Fields Modifier and Type Field Description static PrivateKeyEntryResolver
FAILING
A resolver that fails on all inputstatic PrivateKeyEntryResolver
IGNORING
A resolver that ignores all input
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.security.PrivateKey
resolve(SessionContext session, java.lang.String keyType, byte[] keyData)
-
-
-
Field Detail
-
IGNORING
static final PrivateKeyEntryResolver IGNORING
A resolver that ignores all input
-
FAILING
static final PrivateKeyEntryResolver FAILING
A resolver that fails on all input
-
-
Method Detail
-
resolve
java.security.PrivateKey resolve(SessionContext session, java.lang.String keyType, byte[] keyData) 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 data- Returns:
- The extracted
PrivateKey
- ignored ifnull
- Throws:
java.io.IOException
- If failed to parse the key datajava.security.GeneralSecurityException
- If failed to generate the key
-
-