Class OmemoMessageBuilder<T_IdKeyPair,​T_IdKey,​T_PreKey,​T_SigPreKey,​T_Sess,​T_Addr,​T_ECPub,​T_Bundle,​T_Ciph>

  • Type Parameters:
    T_IdKeyPair - IdentityKeyPair class
    T_IdKey - IdentityKey class
    T_PreKey - PreKey class
    T_SigPreKey - SignedPreKey class
    T_Sess - Session class
    T_Addr - Address class
    T_ECPub - Elliptic Curve PublicKey class
    T_Bundle - Bundle class
    T_Ciph - Cipher class

    public class OmemoMessageBuilder<T_IdKeyPair,​T_IdKey,​T_PreKey,​T_SigPreKey,​T_Sess,​T_Addr,​T_ECPub,​T_Bundle,​T_Ciph>
    extends java.lang.Object
    Class used to build OMEMO messages.
    • Constructor Detail

      • OmemoMessageBuilder

        public OmemoMessageBuilder​(OmemoDevice userDevice,
                                   OmemoTrustCallback callback,
                                   OmemoRatchet<T_IdKeyPair,​T_IdKey,​T_PreKey,​T_SigPreKey,​T_Sess,​T_Addr,​T_ECPub,​T_Bundle,​T_Ciph> ratchet,
                                   byte[] aesKey,
                                   byte[] iv,
                                   java.lang.String message)
                            throws javax.crypto.NoSuchPaddingException,
                                   javax.crypto.BadPaddingException,
                                   java.security.InvalidKeyException,
                                   java.security.NoSuchAlgorithmException,
                                   javax.crypto.IllegalBlockSizeException,
                                   java.security.InvalidAlgorithmParameterException
        Create an OmemoMessageBuilder.
        Parameters:
        userDevice - our OmemoDevice
        callback - trustCallback for querying trust decisions
        ratchet - our OmemoRatchet
        aesKey - aes message key used for message encryption
        iv - initialization vector used for message encryption
        message - message we want to send
        Throws:
        javax.crypto.NoSuchPaddingException - if the requested padding mechanism is not availble.
        javax.crypto.BadPaddingException - if the input data is not padded properly.
        java.security.InvalidKeyException - if the key is invalid.
        java.security.NoSuchAlgorithmException - if no such algorithm is available.
        javax.crypto.IllegalBlockSizeException - if the input data length is incorrect.
        java.security.InvalidAlgorithmParameterException - if the provided arguments are invalid.
      • OmemoMessageBuilder

        public OmemoMessageBuilder​(OmemoDevice userDevice,
                                   OmemoTrustCallback callback,
                                   OmemoRatchet<T_IdKeyPair,​T_IdKey,​T_PreKey,​T_SigPreKey,​T_Sess,​T_Addr,​T_ECPub,​T_Bundle,​T_Ciph> ratchet,
                                   java.lang.String message)
                            throws javax.crypto.NoSuchPaddingException,
                                   javax.crypto.BadPaddingException,
                                   java.security.InvalidKeyException,
                                   java.security.NoSuchAlgorithmException,
                                   javax.crypto.IllegalBlockSizeException,
                                   java.security.InvalidAlgorithmParameterException
        Create an OmemoMessageBuilder.
        Parameters:
        userDevice - our OmemoDevice
        callback - trustCallback for querying trust decisions
        ratchet - our OmemoRatchet
        message - message we want to send
        Throws:
        javax.crypto.NoSuchPaddingException - if the requested padding mechanism is not availble.
        javax.crypto.BadPaddingException - if the input data is not padded properly.
        java.security.InvalidKeyException - if the key is invalid.
        java.security.NoSuchAlgorithmException - if no such algorithm is available.
        javax.crypto.IllegalBlockSizeException - if the input data length is incorrect.
        java.security.InvalidAlgorithmParameterException - if the provided arguments are invalid.