PUB
- Generic PublicKey
typepublic interface PublicKeyRawDataDecoder<PUB extends PublicKey>
Modifier and Type | Method and Description |
---|---|
default PUB |
decodePublicKey(SessionContext session,
String keyType,
byte[] keyData,
int offset,
int length,
Map<String,String> headers) |
default PUB |
decodePublicKey(SessionContext session,
String keyType,
byte[] keyData,
Map<String,String> headers) |
PUB |
decodePublicKey(SessionContext session,
String keyType,
InputStream keyData,
Map<String,String> headers) |
PUB |
decodePublicKeyByType(SessionContext session,
String keyType,
InputStream keyData,
Map<String,String> headers) |
default PUB decodePublicKey(SessionContext session, String keyType, byte[] keyData, Map<String,String> headers) throws IOException, GeneralSecurityException
session
- The SessionContext
for invoking this command - may be null
if
not invoked within a session context (e.g., offline tool or session unknown).keyType
- The OpenSSH
reported key typekeyData
- The key data bytes in OpenSSH
format (after BASE64 decoding) - ignored
if null
/emptyheaders
- Any headers that may have been available when data was readPublicKey
- or null
if no dataIOException
- If failed to decode the keyGeneralSecurityException
- If failed to generate the keydefault PUB decodePublicKey(SessionContext session, String keyType, byte[] keyData, int offset, int length, Map<String,String> headers) throws IOException, GeneralSecurityException
IOException
GeneralSecurityException
PUB decodePublicKeyByType(SessionContext session, String keyType, InputStream keyData, Map<String,String> headers) throws IOException, GeneralSecurityException
IOException
GeneralSecurityException
PUB decodePublicKey(SessionContext session, String keyType, InputStream keyData, Map<String,String> headers) throws IOException, GeneralSecurityException
session
- The SessionContext
for invoking this command - may be null
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 readPublicKey
IOException
- If failed to read from the data streamGeneralSecurityException
- If failed to generate the keyCopyright © 2008–2024 The Apache Software Foundation. All rights reserved.