anotherim/src/main/java/eu/siacs/conversations/crypto/sasl/ScramSha256.java

31 lines
669 B
Java
Raw Normal View History

2017-01-12 20:26:58 +00:00
package eu.siacs.conversations.crypto.sasl;
import org.bouncycastle.crypto.digests.SHA256Digest;
import org.bouncycastle.crypto.macs.HMac;
import java.security.SecureRandom;
import eu.siacs.conversations.entities.Account;
import eu.siacs.conversations.xml.TagWriter;
public class ScramSha256 extends ScramMechanism {
static {
DIGEST = new SHA256Digest();
HMAC = new HMac(new SHA256Digest());
}
public ScramSha256(final TagWriter tagWriter, final Account account, final SecureRandom rng) {
super(tagWriter, account, rng);
}
@Override
public int getPriority() {
return 25;
}
@Override
public String getMechanism() {
return "SCRAM-SHA-256";
}
}