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