Class OmemoKeyUtil.Bundle
java.lang.Object
org.jivesoftware.smackx.omemo.util.OmemoKeyUtil.Bundle
- Enclosing class:
 - OmemoKeyUtil<T_IdKeyPair,
T_IdKey, T_PreKey, T_SigPreKey, T_Sess, T_ECPub, T_Bundle>  
Bundle related methods.
- 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionbundles(OmemoBundleElement bundle, OmemoDevice contact) Break up the OmemoBundleElement into a list of crypto-lib specific bundles (T_PreKey).identityKey(OmemoBundleElement bundle) Extract an IdentityKey from a OmemoBundleElement.preKeyPublic(OmemoBundleElement bundle, int keyId) Extract the preKey with id 'keyId' from the bundle.intsignedPreKeyId(OmemoBundleElement bundle) Extract the id of the transported signedPreKey from the bundle.signedPreKeyPublic(OmemoBundleElement bundle) Extract a signedPreKey from an OmemoBundleElement.byte[]Extract the signature of the signedPreKey in the bundle as a byte array. 
- 
Constructor Details
- 
Bundle
public Bundle() 
 - 
 - 
Method Details
- 
identityKey
Extract an IdentityKey from a OmemoBundleElement.- Parameters:
 bundle- OmemoBundleElement- Returns:
 - identityKey of the bundle
 - Throws:
 CorruptedOmemoKeyException- if the key is damaged/malformed
 - 
signedPreKeyPublic
Extract a signedPreKey from an OmemoBundleElement.- Parameters:
 bundle- OmemoBundleElement- Returns:
 - signed preKey
 - Throws:
 CorruptedOmemoKeyException- if the key is damaged/malformed
 - 
signedPreKeyId
Extract the id of the transported signedPreKey from the bundle.- Parameters:
 bundle- OmemoBundleElement- Returns:
 - id of the signed preKey
 
 - 
signedPreKeySignature
Extract the signature of the signedPreKey in the bundle as a byte array.- Parameters:
 bundle- OmemoBundleElement- Returns:
 - signature on the signed preKey
 
 - 
preKeyPublic
Extract the preKey with id 'keyId' from the bundle.- Parameters:
 bundle- OmemoBundleElementkeyId- id of the preKey- Returns:
 - the preKey
 - Throws:
 CorruptedOmemoKeyException- when the key cannot be parsed from bytes
 - 
bundles
public Map<Integer,T_Bundle> bundles(OmemoBundleElement bundle, OmemoDevice contact) throws CorruptedOmemoKeyException Break up the OmemoBundleElement into a list of crypto-lib specific bundles (T_PreKey). In case of the signal library, we break the OmemoBundleElement in ~100 PreKeyBundles (one for every transported preKey).- Parameters:
 bundle- OmemoBundleElement containing multiple PreKeyscontact- Contact that the bundle belongs to- Returns:
 - a HashMap with one T_Bundle per preKey and the preKeyId as key
 - Throws:
 CorruptedOmemoKeyException- when one of the keys cannot be parsed
 
 -