Package org.jivesoftware.smackx.ox
Class OpenPgpMessage
java.lang.Object
org.jivesoftware.smackx.ox.OpenPgpMessage
This class embodies a decrypted and/or verified 
The content can be one of the following three
 
 
 
 
To determine, of which nature the content of the message is, use
Use
OpenPgpElement.
 The content can be one of the following three
OpenPgpContentElements:
 SignElement: The content is expected to be signed with the senders key, but unencrypted.CryptElement: The content is expected to be encrypted, but not signed.SigncryptElement: The content is expected to be signed with the senders key and encrypted.To determine, of which nature the content of the message is, use
getState(). You should utilize this
 information to cast the return value of getOpenPgpContentElement() correctly.
 Use
getMetadata() in order to get information about the messages encryption status, its signatures etc.- 
Nested Class Summary
Nested Classes - 
Constructor Summary
ConstructorsConstructorDescriptionOpenPgpMessage(byte[] bytes, OpenPgpMessage.State state, org.pgpainless.decryption_verification.OpenPgpMetadata metadata) Constructor.OpenPgpMessage(String content, OpenPgpMessage.State state, org.pgpainless.decryption_verification.OpenPgpMetadata metadata) Constructor. - 
Method Summary
Modifier and TypeMethodDescriptionorg.pgpainless.decryption_verification.OpenPgpMetadataReturn metadata about the encrypted message.Return the decryptedOpenPgpContentElementof this message.getState()Return the state of the message. 
- 
Constructor Details
- 
OpenPgpMessage
public OpenPgpMessage(String content, OpenPgpMessage.State state, org.pgpainless.decryption_verification.OpenPgpMetadata metadata) Constructor.- Parameters:
 content- XML representation of the decryptedOpenPgpContentElement.state-OpenPgpMessage.Stateof theOpenPgpContentElement.metadata- Metadata about the encryption.
 - 
OpenPgpMessage
public OpenPgpMessage(byte[] bytes, OpenPgpMessage.State state, org.pgpainless.decryption_verification.OpenPgpMetadata metadata) Constructor.- Parameters:
 bytes- bytes of the XML representation of the decryptedOpenPgpContentElement.state-OpenPgpMessage.Stateof theOpenPgpContentElement.metadata- metadata about the encryption.
 
 - 
 - 
Method Details
- 
getOpenPgpContentElement
Return the decryptedOpenPgpContentElementof this message. To determine, whether the element is aSignElement,CryptElementorSigncryptElement, please consultgetState().- Returns:
 OpenPgpContentElement- Throws:
 XmlPullParserException- if the parser encounters an error.IOException- if the parser encounters an error.
 - 
getState
Return the state of the message. This value determines, whether the message was aSignElement,CryptElementorSigncryptElement.- Returns:
 - state of the content element.
 - Throws:
 IOException- if the parser encounters an error.XmlPullParserException- if the parser encounters and error.
 - 
getMetadata
Return metadata about the encrypted message.- Returns:
 - metadata TODO javadoc me please
 
 
 -