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,
HashMap<Integer,byte[]> preKeys)
Constructor to create a Bundle Element from decoded byte arrays.
|
OmemoBundleVAxolotlElement(int signedPreKeyId,
String signedPreKeyB64,
String signedPreKeySigB64,
String identityKeyB64,
HashMap<Integer,String> preKeysB64)
Constructor to create a Bundle Element from base64 Strings.
|
Modifier and Type | Method and Description |
---|---|
String |
getElementName()
Returns the root element name.
|
byte[] |
getIdentityKey()
Return the public identityKey of the bundles owner.
|
String |
getNamespace()
Returns the root element XML namespace.
|
byte[] |
getPreKey(int id)
Return a single preKey from the map.
|
HashMap<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.
|
String |
toString() |
XmlStringBuilder |
toXML(String enclosingNamespace)
Returns the XML representation of this Element.
|
equals, hashCode
public OmemoBundleVAxolotlElement(int signedPreKeyId, String signedPreKeyB64, String signedPreKeySigB64, String identityKeyB64, HashMap<Integer,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, HashMap<Integer,byte[]> preKeys)
signedPreKeyId
- idsignedPreKey
- signedPreKeysignedPreKeySig
- signedPreKeySignatureidentityKey
- identityKeypreKeys
- HashMap of preKeyspublic byte[] getSignedPreKey()
public int getSignedPreKeyId()
public byte[] getSignedPreKeySignature()
public byte[] getIdentityKey()
public HashMap<Integer,byte[]> getPreKeys()
public byte[] getPreKey(int id)
id
- id of the preKeypublic String getElementName()
NamedElement
public XmlStringBuilder toXML(String enclosingNamespace)
Element
toXML
in interface Element
toXML
in class OmemoBundleElement
enclosingNamespace
- the enclosing namespace or null
.public String getNamespace()
ExtensionElement