Class MessageInspector
- java.lang.Object
-
- org.pgpainless.decryption_verification.MessageInspector
-
public final class MessageInspector extends java.lang.ObjectInspect an OpenPGP message to determine IDs of its encryption keys or whether it is passphrase protected.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMessageInspector.EncryptionInfo
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static MessageInspector.EncryptionInfodetermineEncryptionInfoForMessage(java.io.InputStream dataIn)Parses parts of the provided OpenPGP message in order to determine which keys were used to encrypt it.static MessageInspector.EncryptionInfodetermineEncryptionInfoForMessage(java.lang.String message)Parses parts of the provided OpenPGP message in order to determine which keys were used to encrypt it.
-
-
-
Method Detail
-
determineEncryptionInfoForMessage
public static MessageInspector.EncryptionInfo determineEncryptionInfoForMessage(java.lang.String message) throws org.bouncycastle.openpgp.PGPException, java.io.IOException
Parses parts of the provided OpenPGP message in order to determine which keys were used to encrypt it.- Parameters:
message- OpenPGP message- Returns:
- encryption info
- Throws:
org.bouncycastle.openpgp.PGPException- in case the message is brokenjava.io.IOException- in case of an IO error
-
determineEncryptionInfoForMessage
public static MessageInspector.EncryptionInfo determineEncryptionInfoForMessage(java.io.InputStream dataIn) throws java.io.IOException, org.bouncycastle.openpgp.PGPException
Parses parts of the provided OpenPGP message in order to determine which keys were used to encrypt it. Note: This method does not rewind the passed in Stream, so you might need to take care of that yourselves.- Parameters:
dataIn- openpgp message- Returns:
- encryption information
- Throws:
java.io.IOException- in case of an IO errororg.bouncycastle.openpgp.PGPException- if the message is broken
-
-