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