Class Dialback

    • Method Detail

      • generateKey

        public static String generateKey​(String secret,
                                         String receivingServer,
                                         String originatingServer,
                                         String streamId)
        Generates a key using the following recommended algorithm.
             HMAC-SHA256
               (
                 SHA256(Secret),
                 {
                   Receiving Server, ' ',
                   Originating Server, ' ',
                   Stream ID
                 }
               )
         
        Parameters:
        secret - The secret.
        receivingServer - The receiving server.
        originatingServer - The originating server.
        streamId - The stream id.
        Returns:
        The dialback key.
        See Also:
        XEP-0185: Dialback Key Generation and Validation
      • getFrom

        public final Jid getFrom()
      • getTo

        public final Jid getTo()
      • isValid

        public final boolean isValid()
      • getKey

        public final String getKey()