diff options
author | 2018-03-14 09:31:13 +0300 | |
---|---|---|
committer | 2018-03-14 09:31:13 +0300 | |
commit | b1e8980ed1460340fe4e8db2ce0d7ee1d213854a (patch) | |
tree | cd4d2ff004863d2c74736ea0d5790d8ef60fa4b1 /juick-server/src/main/java/com/juick/server/xmpp/s2s/util/DialbackUtils.java | |
parent | 876f07840f6fa73e6f2ca0350d4ca8922c869075 (diff) |
cleanup or supress warnings
Diffstat (limited to 'juick-server/src/main/java/com/juick/server/xmpp/s2s/util/DialbackUtils.java')
-rw-r--r-- | juick-server/src/main/java/com/juick/server/xmpp/s2s/util/DialbackUtils.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/juick-server/src/main/java/com/juick/server/xmpp/s2s/util/DialbackUtils.java b/juick-server/src/main/java/com/juick/server/xmpp/s2s/util/DialbackUtils.java index 71405f34..d25dbad8 100644 --- a/juick-server/src/main/java/com/juick/server/xmpp/s2s/util/DialbackUtils.java +++ b/juick-server/src/main/java/com/juick/server/xmpp/s2s/util/DialbackUtils.java @@ -18,6 +18,7 @@ package com.juick.server.xmpp.s2s.util; import org.apache.commons.codec.digest.DigestUtils; +import org.apache.commons.codec.digest.HmacAlgorithms; import org.apache.commons.codec.digest.HmacUtils; import rocks.xmpp.addr.Jid; @@ -30,7 +31,7 @@ public class DialbackUtils { } public static String generateDialbackKey(String secret, Jid to, Jid from, String id) { - return HmacUtils.hmacSha256Hex(DigestUtils.sha256(secret), - (to.toEscapedString() + " " + from.toEscapedString() + " " + id).getBytes()); + return new HmacUtils(HmacAlgorithms.HMAC_SHA_256, DigestUtils.sha256(secret)) + .hmacHex(to.toEscapedString() + " " + from.toEscapedString() + " " + id); } } |