public class OmemoKeyUtil.Bundle extends Object
Constructor and Description |
---|
Bundle() |
Modifier and Type | Method and Description |
---|---|
HashMap<Integer,T_Bundle> |
bundles(OmemoBundleVAxolotlElement bundle,
OmemoDevice contact)
Break up the OmemoBundleElement into a list of crypto-lib specific bundles (T_PreKey).
|
T_IdKey |
identityKey(OmemoBundleVAxolotlElement bundle)
Extract an IdentityKey from a OmemoBundleElement.
|
T_ECPub |
preKeyPublic(OmemoBundleVAxolotlElement bundle,
int keyId)
Extract the preKey with id 'keyId' from the bundle.
|
int |
signedPreKeyId(OmemoBundleVAxolotlElement bundle)
Extract the id of the transported signedPreKey from the bundle.
|
T_ECPub |
signedPreKeyPublic(OmemoBundleVAxolotlElement bundle)
Extract a signedPreKey from an OmemoBundleElement.
|
byte[] |
signedPreKeySignature(OmemoBundleVAxolotlElement bundle)
Extract the signature of the signedPreKey in the bundle as a byte array.
|
public Bundle()
public T_IdKey identityKey(OmemoBundleVAxolotlElement bundle) throws CorruptedOmemoKeyException
bundle
- OmemoBundleElementCorruptedOmemoKeyException
- if the key is damaged/malformedpublic T_ECPub signedPreKeyPublic(OmemoBundleVAxolotlElement bundle) throws CorruptedOmemoKeyException
bundle
- OmemoBundleElementCorruptedOmemoKeyException
- if the key is damaged/malformedpublic int signedPreKeyId(OmemoBundleVAxolotlElement bundle)
bundle
- OmemoBundleElementpublic byte[] signedPreKeySignature(OmemoBundleVAxolotlElement bundle)
bundle
- OmemoBundleElementpublic T_ECPub preKeyPublic(OmemoBundleVAxolotlElement bundle, int keyId) throws CorruptedOmemoKeyException
bundle
- OmemoBundleElementkeyId
- id of the preKeyCorruptedOmemoKeyException
- when the key cannot be parsed from bytespublic HashMap<Integer,T_Bundle> bundles(OmemoBundleVAxolotlElement bundle, OmemoDevice contact) throws CorruptedOmemoKeyException
bundle
- OmemoBundleElement containing multiple PreKeyscontact
- Contact that the bundle belongs toCorruptedOmemoKeyException
- when one of the keys cannot be parsed