Package org.jivesoftware.openfire.auth
Class ScramUtils
- java.lang.Object
-
- org.jivesoftware.openfire.auth.ScramUtils
-
public class ScramUtils extends Object
A utility class that provides methods that are useful for dealing with Salted Challenge Response Authentication Mechanism (SCRAM).- Author:
- Richard Midwinter
-
-
Field Summary
Fields Modifier and Type Field Description static int
DEFAULT_ITERATION_COUNT
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static byte[]
computeHmac(byte[] key, String string)
static byte[]
createSaltedPassword(byte[] salt, String password, int iters)
static Mac
createSha1Hmac(byte[] keyBytes)
-
-
-
Field Detail
-
DEFAULT_ITERATION_COUNT
public static final int DEFAULT_ITERATION_COUNT
- See Also:
- Constant Field Values
-
-
Method Detail
-
createSaltedPassword
public static byte[] createSaltedPassword(byte[] salt, String password, int iters) throws SaslException
- Throws:
SaslException
-
computeHmac
public static byte[] computeHmac(byte[] key, String string) throws SaslException
- Throws:
SaslException
-
createSha1Hmac
public static Mac createSha1Hmac(byte[] keyBytes) throws SaslException
- Throws:
SaslException
-
-