Class ShaSaslClient
- java.lang.Object
-
- com.couchbase.client.core.security.sasl.ShaSaslClient
-
- All Implemented Interfaces:
SaslClient
public class ShaSaslClient extends Object implements SaslClient
Implementation of a SCRAM-SHA512, SCRAM-SHA256 and SCRAM-SHA1 enabledSaslClient
.- Since:
- 1.2.5
- Author:
- Trond Norbye
-
-
Constructor Summary
Constructors Constructor Description ShaSaslClient(CallbackHandler cbh, int sha)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
dispose()
byte[]
evaluateChallenge(byte[] challenge)
String
getMechanismName()
Object
getNegotiatedProperty(String propName)
boolean
hasInitialResponse()
boolean
isComplete()
byte[]
unwrap(byte[] incoming, int offset, int len)
byte[]
wrap(byte[] outgoing, int offset, int len)
-
-
-
Constructor Detail
-
ShaSaslClient
public ShaSaslClient(CallbackHandler cbh, int sha) throws NoSuchAlgorithmException
- Throws:
NoSuchAlgorithmException
-
-
Method Detail
-
getMechanismName
public String getMechanismName()
- Specified by:
getMechanismName
in interfaceSaslClient
-
hasInitialResponse
public boolean hasInitialResponse()
- Specified by:
hasInitialResponse
in interfaceSaslClient
-
evaluateChallenge
public byte[] evaluateChallenge(byte[] challenge) throws SaslException
- Specified by:
evaluateChallenge
in interfaceSaslClient
- Throws:
SaslException
-
isComplete
public boolean isComplete()
- Specified by:
isComplete
in interfaceSaslClient
-
unwrap
public byte[] unwrap(byte[] incoming, int offset, int len) throws SaslException
- Specified by:
unwrap
in interfaceSaslClient
- Throws:
SaslException
-
wrap
public byte[] wrap(byte[] outgoing, int offset, int len) throws SaslException
- Specified by:
wrap
in interfaceSaslClient
- Throws:
SaslException
-
getNegotiatedProperty
public Object getNegotiatedProperty(String propName)
- Specified by:
getNegotiatedProperty
in interfaceSaslClient
-
dispose
public void dispose() throws SaslException
- Specified by:
dispose
in interfaceSaslClient
- Throws:
SaslException
-
-