diff options
Diffstat (limited to 'juick-xmpp')
-rw-r--r-- | juick-xmpp/src/main/java/com/juick/components/s2s/util/DialbackUtils.java | 4 | ||||
-rw-r--r-- | juick-xmpp/src/main/java/com/juick/xmpp/extensions/JuickMessage.java | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/juick-xmpp/src/main/java/com/juick/components/s2s/util/DialbackUtils.java b/juick-xmpp/src/main/java/com/juick/components/s2s/util/DialbackUtils.java index 3bb786e5..980c2d6a 100644 --- a/juick-xmpp/src/main/java/com/juick/components/s2s/util/DialbackUtils.java +++ b/juick-xmpp/src/main/java/com/juick/components/s2s/util/DialbackUtils.java @@ -7,6 +7,10 @@ import org.apache.commons.codec.digest.HmacUtils; * Created by vitalyster on 05.12.2016. */ public class DialbackUtils { + private DialbackUtils() { + throw new IllegalStateException(); + } + public static String generateDialbackKey(String secret, String to, String from, String id) { return HmacUtils.hmacSha256Hex(DigestUtils.sha256(secret), (to + " " + from + " " + id).getBytes()); diff --git a/juick-xmpp/src/main/java/com/juick/xmpp/extensions/JuickMessage.java b/juick-xmpp/src/main/java/com/juick/xmpp/extensions/JuickMessage.java index b8a329db..ae7fc89c 100644 --- a/juick-xmpp/src/main/java/com/juick/xmpp/extensions/JuickMessage.java +++ b/juick-xmpp/src/main/java/com/juick/xmpp/extensions/JuickMessage.java @@ -135,8 +135,8 @@ public class JuickMessage extends com.juick.Message implements StanzaChild { if (getText() != null) builder.append("<body>").append(XmlUtils.escape(getText())).append("</body>"); - for (com.juick.Tag Tag : getTags()) - builder.append("<tag>").append(XmlUtils.escape(Tag.getName())).append("</tag>"); + for (com.juick.Tag tag : getTags()) + builder.append("<tag>").append(XmlUtils.escape(tag.getName())).append("</tag>"); builder.append("</").append(TagName).append(">"); |