Class OmemoKeyUtil.Bundle

    • Constructor Detail

      • Bundle

        public Bundle()
    • Method Detail

      • signedPreKeyId

        public int signedPreKeyId​(OmemoBundleElement bundle)
        Extract the id of the transported signedPreKey from the bundle.
        Parameters:
        bundle - OmemoBundleElement
        Returns:
        id of the signed preKey
      • signedPreKeySignature

        public byte[] signedPreKeySignature​(OmemoBundleElement bundle)
        Extract the signature of the signedPreKey in the bundle as a byte array.
        Parameters:
        bundle - OmemoBundleElement
        Returns:
        signature on the signed preKey
      • bundles

        public java.util.HashMap<java.lang.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 PreKeys
        contact - 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