Interface PublicKeyRawDataDecoder<PUB extends java.security.PublicKey>
-
- Type Parameters:
PUB- GenericPublicKeytype
- 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 PUBdecodePublicKey(SessionContext session, java.lang.String keyType, byte[] keyData, int offset, int length, java.util.Map<java.lang.String,java.lang.String> headers)default PUBdecodePublicKey(SessionContext session, java.lang.String keyType, byte[] keyData, java.util.Map<java.lang.String,java.lang.String> headers)PUBdecodePublicKey(SessionContext session, java.lang.String keyType, java.io.InputStream keyData, java.util.Map<java.lang.String,java.lang.String> headers)PUBdecodePublicKeyByType(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- TheSessionContextfor invoking this command - may benullif not invoked within a session context (e.g., offline tool or session unknown).keyType- TheOpenSSHreported key typekeyData- The key data bytes inOpenSSHformat (after BASE64 decoding) - ignored ifnull/emptyheaders- Any headers that may have been available when data was read- Returns:
- The decoded
PublicKey- ornullif 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.IOExceptionjava.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.IOExceptionjava.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- TheSessionContextfor invoking this command - may benullif 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
-
-