public class OmemoBundleVAxolotlElement extends OmemoBundleElement
BUNDLE, IDENTITY_KEY, PRE_KEY_ID, PRE_KEY_PUB, PRE_KEYS, SIGNED_PRE_KEY_ID, SIGNED_PRE_KEY_PUB, SIGNED_PRE_KEY_SIG
Constructor and Description |
---|
OmemoBundleVAxolotlElement(int signedPreKeyId,
byte[] signedPreKey,
byte[] signedPreKeySig,
byte[] identityKey,
java.util.HashMap<java.lang.Integer,byte[]> preKeys)
Constructor to create a Bundle Element from decoded byte arrays.
|
OmemoBundleVAxolotlElement(int signedPreKeyId,
java.lang.String signedPreKeyB64,
java.lang.String signedPreKeySigB64,
java.lang.String identityKeyB64,
java.util.HashMap<java.lang.Integer,java.lang.String> preKeysB64)
Constructor to create a Bundle Element from base64 Strings.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getElementName()
Returns the root element name.
|
byte[] |
getIdentityKey()
Return the public identityKey of the bundles owner.
|
java.lang.String |
getNamespace()
Returns the root element XML namespace.
|
byte[] |
getPreKey(int id)
Return a single preKey from the map.
|
java.util.HashMap<java.lang.Integer,byte[]> |
getPreKeys()
Return the HashMap of preKeys in the bundle.
|
byte[] |
getSignedPreKey()
Return the signedPreKey of the OmemoBundleElement.
|
int |
getSignedPreKeyId()
Return the id of the signedPreKey in the bundle.
|
byte[] |
getSignedPreKeySignature()
Get the signature of the signedPreKey.
|
java.lang.String |
toString() |
XmlStringBuilder |
toXML()
Returns the XML representation of this Element.
|
equals, hashCode
public OmemoBundleVAxolotlElement(int signedPreKeyId, java.lang.String signedPreKeyB64, java.lang.String signedPreKeySigB64, java.lang.String identityKeyB64, java.util.HashMap<java.lang.Integer,java.lang.String> preKeysB64)
signedPreKeyId
- idsignedPreKeyB64
- base64 encoded signedPreKeysignedPreKeySigB64
- base64 encoded signedPreKeySignatureidentityKeyB64
- base64 encoded identityKeypreKeysB64
- HashMap of base64 encoded preKeyspublic OmemoBundleVAxolotlElement(int signedPreKeyId, byte[] signedPreKey, byte[] signedPreKeySig, byte[] identityKey, java.util.HashMap<java.lang.Integer,byte[]> preKeys)
signedPreKeyId
- idsignedPreKey
- signedPreKeysignedPreKeySig
- signedPreKeySignatureidentityKey
- identityKeypreKeys
- HashMap of preKeyspublic byte[] getSignedPreKey()
public int getSignedPreKeyId()
public byte[] getSignedPreKeySignature()
public byte[] getIdentityKey()
public java.util.HashMap<java.lang.Integer,byte[]> getPreKeys()
public byte[] getPreKey(int id)
id
- id of the preKeypublic java.lang.String getElementName()
NamedElement
public XmlStringBuilder toXML()
Element
toXML
in interface Element
toXML
in class OmemoBundleElement
public java.lang.String getNamespace()
ExtensionElement
public java.lang.String toString()
toString
in class java.lang.Object