Instance Method

authenticationDataForComponents:

Returns an NSData object to be used as an authentication stamp for an outgoing message.

Declaration

- (NSData *)authenticationDataForComponents:(NSArray *)components;

Parameters

components

An array containing the elements of a network message, in the form of NSPort and NSData 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 NSPortMessage class specification for more information on the components.

If authenticationDataForComponents: returns nil, an NSGenericException 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 authenticateComponents:withData: and to handle the situation appropriately.

The components parameter will be validated on receipt by the delegate of the peer NSConnection object with authenticateComponents:withData:.

See Also

Authenticating

- authenticateComponents:withData:

Returns a Boolean value that indicates whether given authentication data is valid for a given set of components.

Deprecated