1package eu.siacs.conversations.crypto.sasl;
2
3import com.google.common.hash.HashFunction;
4import com.google.common.hash.Hashing;
5
6import eu.siacs.conversations.entities.Account;
7
8public class ScramSha256Plus extends ScramPlusMechanism {
9
10 public static final String MECHANISM = "SCRAM-SHA-256-PLUS";
11
12 public ScramSha256Plus(final Account account, final ChannelBinding channelBinding) {
13 super(account, channelBinding);
14 }
15
16 @Override
17 protected HashFunction getHMac(final byte[] key) {
18 return Hashing.hmacSha256(key);
19 }
20
21 @Override
22 protected HashFunction getDigest() {
23 return Hashing.sha256();
24 }
25
26 @Override
27 public int getPriority() {
28 return 40;
29 }
30
31 @Override
32 public String getMechanism() {
33 return MECHANISM;
34 }
35}