Class OmemoHeaderElement
- java.lang.Object
-
- org.jivesoftware.smackx.omemo.element.OmemoHeaderElement
-
- All Implemented Interfaces:
Element
,FullyQualifiedElement
,NamedElement
,XmlLangElement
- Direct Known Subclasses:
OmemoHeaderElement_VAxolotl
public abstract class OmemoHeaderElement extends Object implements FullyQualifiedElement
Header element of the message. The header contains information about the sender and the encrypted keys for the recipients, as well as the iv element for AES.
-
-
Constructor Summary
Constructors Constructor Description OmemoHeaderElement(int sid, List<OmemoKeyElement> keys, byte[] iv)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getElementName()
Returns the root element name.byte[]
getIv()
ArrayList<OmemoKeyElement>
getKeys()
String
getNamespace()
Returns the root element XML namespace.int
getSid()
Return the deviceId of the sender of the message.XmlStringBuilder
toXML(XmlEnvironment enclosingXmlEnvironment)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.jivesoftware.smack.packet.FullyQualifiedElement
getLanguage, getQName
-
-
-
-
Field Detail
-
ELEMENT
public static final String ELEMENT
- See Also:
- Constant Field Values
-
NAMESPACE
public static final String NAMESPACE
- See Also:
- Constant Field Values
-
ATTR_SID
public static final String ATTR_SID
- See Also:
- Constant Field Values
-
ATTR_IV
public static final String ATTR_IV
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
OmemoHeaderElement
public OmemoHeaderElement(int sid, List<OmemoKeyElement> keys, byte[] iv)
-
-
Method Detail
-
getSid
public int getSid()
Return the deviceId of the sender of the message.- Returns:
- senders id
-
getKeys
public ArrayList<OmemoKeyElement> getKeys()
-
getIv
public byte[] getIv()
-
getElementName
public String getElementName()
Description copied from interface:NamedElement
Returns the root element name.- Specified by:
getElementName
in interfaceNamedElement
- Returns:
- the element name.
-
getNamespace
public String getNamespace()
Description copied from interface:FullyQualifiedElement
Returns the root element XML namespace.- Specified by:
getNamespace
in interfaceFullyQualifiedElement
- Returns:
- the namespace.
-
toXML
public XmlStringBuilder toXML(XmlEnvironment enclosingXmlEnvironment)
-
-