aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart/messenger/crypto/sasl/ScramSha1.java
blob: c613385363dc15134c09641f06c0a42882b6dc45 (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
package de.pixart.messenger.crypto.sasl;

import org.bouncycastle.crypto.digests.SHA1Digest;
import org.bouncycastle.crypto.macs.HMac;

import java.security.SecureRandom;

import de.pixart.messenger.entities.Account;
import de.pixart.messenger.xml.TagWriter;

public class ScramSha1 extends ScramMechanism {
    static {
        DIGEST = new SHA1Digest();
        HMAC = new HMac(new SHA1Digest());
    }

    public ScramSha1(final TagWriter tagWriter, final Account account, final SecureRandom rng) {
        super(tagWriter, account, rng);
    }

    @Override
    public int getPriority() {
        return 20;
    }

    @Override
    public String getMechanism() {
        return "SCRAM-SHA-1";
    }
}