The MessageProp object is instantiated by the application and used to specify a QOP value which selects cryptographic algorithms, and a privacy service to optionally encrypt the message. The underlying mechanism that is used in the call may not be able to provide the privacy service. It sets the actual privacy service that it does provide in this MessageProp object which the caller should then query upon return. If the mechanism is not able to provide the requested QOP, it throws a GSSException with the BAD_QOP code.
Since some application-level protocols may wish to use tokens emitted by wrap to provide "secure framing", implementations should support the wrapping of zero-length messages.
The application will be responsible for sending the token to the peer. @param inBuf application data to be protected. @param offset the offset within the inBuf where the data begins. @param len the length of the data @param msgProp instance of MessageProp that is used by theapplication to set the desired QOP and privacy state. Set the desired QOP to 0 to request the default QOP. Upon return from this method, this object will contain the the actual privacy state that was applied to the message by the underlying mechanism. @return a byte[] containing the token to be sent to the peer. @throws GSSException containing the following major error codes: {@link GSSException#CONTEXT_EXPIRED GSSException.CONTEXT_EXPIRED}, {@link GSSException#BAD_QOP GSSException.BAD_QOP}, {@link GSSException#FAILURE GSSException.FAILURE}
|
|