Modifier and Type | Field and Description |
---|---|
pack-priv byte[] | |
pack-priv static final int | CONFOUNDER_SIZE
The size of the random confounder used in a WrapToken. |
private byte[] | |
private int | |
private int | |
private final int | |
private InputStream | |
pack-priv byte[] | |
pack-priv static final byte[][] | |
private final boolean | |
private boolean | |
private byte[] | |
private int | |
private int |
Access | Constructor and Description |
---|---|
public | WrapToken(Krb5Context
the mechanism context associated with this
token context, byte[] the bytes of the token tokenBytes, int the offset of the token tokenOffset, int the length of the token tokenLen, MessageProp the MessageProp into which characteristics of the
parsed token will be stored. prop)Constructs a WrapToken from token bytes obtained from the peer. |
public | WrapToken(Krb5Context
the mechanism context associated with this
token context, InputStream the InputStream containing the token bytes is, MessageProp the MessageProp into which characteristics of the
parsed token will be stored. prop)Constructs a WrapToken from token bytes read on the fly from an InputStream. |
public |
Modifier and Type | Method and Description |
---|---|
public void | encode(OutputStream
the OutputStream to which this should be written os)Overrides sun. Encodes a GSSHeader and this token onto an OutputStream. |
public byte[] | |
public int | |
public byte[] | Returns: a byte array containing the application dataObtains the application data that was transmitted in this WrapToken. |
public int | Returns: the size of the data writtenthe output buffer into which the data must be
written dataBuf, int the offset at which to write the data dataBufOffset)Obtains the application data that was transmitted in this WrapToken, writing it into an application provided output array. |
private void | getDataFromBuffer(byte[]
the output buffer into which the data must be
written dataBuf, int the offset at which to write the data dataBufOffset)Helper routine to obtain the application data transmitted in this WrapToken. |
private void | getDataFromStream(byte[]
the output buffer into which the data must be
written dataBuf, int the offset at which to write the data dataBufOffset)Helper routine to obtain the application data transmitted in this WrapToken. |
protected int | getKrb5TokenSize()
Overrides sun. Obtains the size of this token. |
private byte[] | Returns: the padding to be appliedthe length of the application data len)Helper routine to pick the right padding for a certain length of application data. |
protected int | getSealAlg(boolean
true if the application desired confidentiality
on this token, false otherwise conf, int the qop requested by the application qop)Implements abstract sun. Obtains the encryption algorithm that should be used in this token given the state of confidentiality the application requested. |
pack-priv static int |
confounder | back to summary |
---|---|
pack-priv byte[] confounder |
CONFOUNDER_SIZE | back to summary |
---|---|
pack-priv static final int CONFOUNDER_SIZE The size of the random confounder used in a WrapToken. |
dataBytes | back to summary |
---|---|
private byte[] dataBytes |
dataLen | back to summary |
---|---|
private int dataLen |
dataOffset | back to summary |
---|---|
private int dataOffset |
dataSize | back to summary |
---|---|
private final int dataSize |
is | back to summary |
---|---|
private InputStream is |
padding | back to summary |
---|---|
pack-priv byte[] padding |
pads | back to summary |
---|---|
pack-priv static final byte[][] pads |
privacy | back to summary |
---|---|
private final boolean privacy |
readTokenFromInputStream | back to summary |
---|---|
private boolean readTokenFromInputStream |
tokenBytes | back to summary |
---|---|
private byte[] tokenBytes |
tokenLen | back to summary |
---|---|
private int tokenLen |
tokenOffset | back to summary |
---|---|
private int tokenOffset |
WrapToken | back to summary |
---|---|
public WrapToken(Krb5Context context, byte[] tokenBytes, int tokenOffset, int tokenLen, MessageProp prop) throws GSSException Constructs a WrapToken from token bytes obtained from the peer.
|
WrapToken | back to summary |
---|---|
public WrapToken(Krb5Context context, InputStream is, MessageProp prop) throws GSSException Constructs a WrapToken from token bytes read on the fly from an InputStream.
|
WrapToken | back to summary |
---|---|
public WrapToken(Krb5Context context, MessageProp prop, byte[] dataBytes, int dataOffset, int dataLen) throws GSSException |
encode | back to summary |
---|---|
public void encode(OutputStream os) throws IOException, GSSException Overrides sun. Doc from sun. Encodes a GSSHeader and this token onto an OutputStream.
|
encode | back to summary |
---|---|
public byte[] encode() throws IOException, GSSException |
encode | back to summary |
---|---|
public int encode(byte[] outToken, int offset) throws IOException, GSSException |
getData | back to summary |
---|---|
public byte[] getData() throws GSSException Obtains the application data that was transmitted in this WrapToken.
|
getData | back to summary |
---|---|
public int getData(byte[] dataBuf, int dataBufOffset) throws GSSException Obtains the application data that was transmitted in this WrapToken, writing it into an application provided output array.
|
getDataFromBuffer | back to summary |
---|---|
private void getDataFromBuffer(byte[] dataBuf, int dataBufOffset) throws GSSException Helper routine to obtain the application data transmitted in this WrapToken. It is called if the WrapToken was constructed with a byte array as input.
|
getDataFromStream | back to summary |
---|---|
private void getDataFromStream(byte[] dataBuf, int dataBufOffset) throws GSSException Helper routine to obtain the application data transmitted in this WrapToken. It is called if the WrapToken was constructed with an Inputstream.
|
getKrb5TokenSize | back to summary |
---|---|
protected int getKrb5TokenSize() throws GSSException Overrides sun. Doc from sun. Obtains the size of this token. Note that this excludes the size of the GSSHeader.
|
getPadding | back to summary |
---|---|
private byte[] getPadding(int len) Helper routine to pick the right padding for a certain length of application data. Every application message has some padding between 1 and 8 bytes.
|
getSealAlg | back to summary |
---|---|
protected int getSealAlg(boolean conf, int qop) throws GSSException Implements abstract sun. Doc from sun. Obtains the encryption algorithm that should be used in this token given the state of confidentiality the application requested. Requested qop must be consistent with negotiated session key.
|
getSizeLimit | back to summary |
---|---|
pack-priv static int getSizeLimit(int qop, boolean confReq, int maxTokenSize, CipherHelper ch) throws GSSException |