APIdia Launch Partner
Top Description Fields Constructors Methods
com.sun.security.sasl.util

public abstract Class AbstractSaslImpl

extends Object
Class Inheritance
Known Direct Subclasses
com.sun.security.sasl.digest.DigestMD5Base
Imports
javax.security.sasl.*, java.io.*, java.util.Map, .StringTokenizer, java.util.logging.Logger, .Level, sun.security.util.HexDumpEncoder

The base class used by client and server implementations of SASL mechanisms to process properties passed in the props argument and strings with the same format (e.g., used in digest-md5). Also contains utilities for doing int to network-byte-order transformations.
Author
Rosanna Lee

Field Summary

Modifier and TypeField and Description
protected byte
protected boolean
private static final byte[]
private static final byte[]
protected static final byte
protected boolean
protected static final byte
protected static final Logger
logger

Logger for debug messages

protected static final byte
protected static final String
protected static final byte
protected String
protected static final byte
protected boolean
protected static final byte
protected byte[]
private static final byte[]
private static final String[]
protected int
protected int
private static final String
protected int
protected byte[]
private static final byte[]
private static final String[]

Constructor Summary

AccessConstructor and Description
protected
AbstractSaslImpl(Map<String, ?> props, String className)

Method Summary

Modifier and TypeMethod and Description
protected static final byte
combineMasks(byte[] in)

protected static final byte
findPreferredMask(byte pref, byte[] in)

public Object
getNegotiatedProperty(String propName)

Retrieves the negotiated property.

protected static final void
intToNetworkByteOrder(int num, byte[] buf, int start, int count)

Encodes an integer into 4 bytes in network byte order in the buffer supplied.

public boolean

Returns:

true if has completed; false otherwise;
isComplete
()

Determines whether this mechanism has completed.

protected static final int
networkByteOrderToInt(byte[] buf, int start, int count)

Returns the integer represented by 4 bytes in network byte order.

private static final byte[]
parseProp(String propName, String propVal, String[] vals, byte[] masks, String[] tokens, boolean ignore)

private static final byte[]
protected static final byte[]
parseQop(String qop, String[] saveTokens, boolean ignore)

private static final byte[]
protected static final void
traceOutput(String srcClass, String srcMethod, String traceTag, byte[] output)

Outputs a byte array.

protected static final void
traceOutput(String srcClass, String srcMethod, String traceTag, byte[] output, int offset, int len)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

allQopback to summary
protected byte allQop
completedback to summary
protected boolean completed
DEFAULT_QOPback to summary
private static final byte[] DEFAULT_QOP
DEFAULT_STRENGTHback to summary
private static final byte[] DEFAULT_STRENGTH
HIGH_STRENGTHback to summary
protected static final byte HIGH_STRENGTH
integrityback to summary
protected boolean integrity
INTEGRITY_ONLY_PROTECTIONback to summary
protected static final byte INTEGRITY_ONLY_PROTECTION
loggerback to summary
protected static final Logger logger

Logger for debug messages

LOW_STRENGTHback to summary
protected static final byte LOW_STRENGTH
MAX_SEND_BUFback to summary
protected static final String MAX_SEND_BUF
MEDIUM_STRENGTHback to summary
protected static final byte MEDIUM_STRENGTH
myClassNameback to summary
protected String myClassName
NO_PROTECTIONback to summary
protected static final byte NO_PROTECTION
privacyback to summary
protected boolean privacy
PRIVACY_PROTECTIONback to summary
protected static final byte PRIVACY_PROTECTION
qopback to summary
protected byte[] qop
QOP_MASKSback to summary
private static final byte[] QOP_MASKS
QOP_TOKENSback to summary
private static final String[] QOP_TOKENS
rawSendSizeback to summary
protected int rawSendSize
recvMaxBufSizeback to summary
protected int recvMaxBufSize
SASL_LOGGER_NAMEback to summary
private static final String SASL_LOGGER_NAME
sendMaxBufSizeback to summary
protected int sendMaxBufSize
strengthback to summary
protected byte[] strength
STRENGTH_MASKSback to summary
private static final byte[] STRENGTH_MASKS
STRENGTH_TOKENSback to summary
private static final String[] STRENGTH_TOKENS

Constructor Detail

AbstractSaslImplback to summary
protected AbstractSaslImpl(Map<String, ?> props, String className) throws SaslException

Method Detail

combineMasksback to summary
protected static final byte combineMasks(byte[] in)
findPreferredMaskback to summary
protected static final byte findPreferredMask(byte pref, byte[] in)
getNegotiatedPropertyback to summary
public Object getNegotiatedProperty(String propName)

Retrieves the negotiated property.

Exceptions
IllegalStateException:
if this authentication exchange has not completed
intToNetworkByteOrderback to summary
protected static final void intToNetworkByteOrder(int num, byte[] buf, int start, int count)

Encodes an integer into 4 bytes in network byte order in the buffer supplied.

isCompleteback to summary
public boolean isComplete()

Determines whether this mechanism has completed.

Returns:boolean

true if has completed; false otherwise;

networkByteOrderToIntback to summary
protected static final int networkByteOrderToInt(byte[] buf, int start, int count)

Returns the integer represented by 4 bytes in network byte order.

parsePropback to summary
private static final byte[] parseProp(String propName, String propVal, String[] vals, byte[] masks, String[] tokens, boolean ignore) throws SaslException
parseQopback to summary
private static final byte[] parseQop(String qop) throws SaslException
parseQopback to summary
protected static final byte[] parseQop(String qop, String[] saveTokens, boolean ignore) throws SaslException
parseStrengthback to summary
private static final byte[] parseStrength(String strength) throws SaslException
traceOutputback to summary
protected static final void traceOutput(String srcClass, String srcMethod, String traceTag, byte[] output)

Outputs a byte array. Can be null.

traceOutputback to summary
protected static final void traceOutput(String srcClass, String srcMethod, String traceTag, byte[] output, int offset, int len)