Returns an NSData
object to be used as an authentication stamp for an outgoing message.
SDK
- macOS 10.0–10.13Deprecated
Framework
- Foundation
Declaration
Parameters
components
An array containing the elements of a network message, in the form of
NSPort
andNSData
objects.
Return Value
An NSData
object to be used as an authentication stamp for an outgoing message.
Discussion
The delegate should use only the NSData
elements to create the authentication stamp. See the NSPort
class specification for more information on the components.
If authentication
returns nil
, an NSGeneric
will be raised. If the delegate determines that the message shouldn’t be authenticated, it should return an empty NSData
object. The delegate on the other side of the connection must then be prepared to accept an empty NSData
object as the second parameter to authenticate
and to handle the situation appropriately.
The components
parameter will be validated on receipt by the delegate of the peer NSConnection
object with authenticate
.