ROAESEncryptionEnvelope

Overview

The ROAESEncryptionEnvelope class represents a specific RO Message Envelope that uses the widely-known symetric AES/Rijndael encryption mechanism for encrypting and decrypting messages that will be wired over a network.

You may use this class to provide secured communication between your server and clients.

Envelopes can be added to the envelopes dictionary on the message. The code snippet below shows how to set up an AES envelope with a given password for the message.

// Set up rda and server access
rda = [[DASimpleRemoteDataAdapter alloc] initWithTargetUrl:targetUrl];
[[[[rda dataService] message] envelopes] removeAllObjects];
if ([aesPassword length] > 0)
{
    ROAESEncryptionEnvelope *aesEnvelope = [[ROAESEncryptionEnvelope alloc] initWithPassword:aesPassword];
    [[[[rda dataService] message] envelopes] setValue:aesEnvelope forKey:@"AES"];
    [aesEnvelope release];
}
[[rda dataService] setServiceName:serviceName];
[rda setDelegate:self];

Location

 

defaultEnvelopeMarker    (declared in ROMessageEnvelope)

+ (NSString *) defaultEnvelopeMarker

enabled  assign    (declared in ROMessageEnvelope)

@property (assign) BOOL enabled

envelopeMarker  copy    (declared in ROMessageEnvelope)

@property (copy) NSString *envelopeMarker

initWithPassword:

- (InstanceType) initWithPassword:(NSString *)aPassword

Parameters:

  • aPassword:

password  copy

Represents password for AES envelope

@property (copy) NSString *password

unwrapMessageFromData:    (declared in ROMessageEnvelope)

for internal use; Unwraps a message from the given block of NSData. Internally calls unwrapMessageFromData:offset: with an offset of 0.

- (NSData *) unwrapMessageFromData:(NSData *)aData

Parameters:

  • aData:

unwrapMessageFromData:offset:    (declared in ROMessageEnvelope)

for internal use; Must be implemented in concrete envelopes to unwrap a message from the given block of NSData at the specified offset.

- (NSData *) unwrapMessageFromData:(NSData *)aData offset:(long)aOffset

Parameters:

  • aData:
  • aOffset:

wrapMessage:toData:clientID:    (declared in ROMessageEnvelope)

for internal use; Must be implemented in a concrete envelope to wrap the given message data to the NSData. The ClientID is provided for reference, and may be encoded in the envelopes header, if needed for unwrapping on the remote side.

- (void) wrapMessage:(NSData *)aMessageData toData:(NSMutableData *)aData clientID:(ROGuid *)aClientID

Parameters:

  • aMessageData:
  • aData:
  • aClientID:

 

enabled  assign    (declared in ROMessageEnvelope)

@property (assign) BOOL enabled

envelopeMarker  copy    (declared in ROMessageEnvelope)

@property (copy) NSString *envelopeMarker

password  copy

Represents password for AES envelope

@property (copy) NSString *password

 

defaultEnvelopeMarker    (declared in ROMessageEnvelope)

+ (NSString *) defaultEnvelopeMarker

 

initWithPassword:

- (InstanceType) initWithPassword:(NSString *)aPassword

Parameters:

  • aPassword:

unwrapMessageFromData:    (declared in ROMessageEnvelope)

for internal use; Unwraps a message from the given block of NSData. Internally calls unwrapMessageFromData:offset: with an offset of 0.

- (NSData *) unwrapMessageFromData:(NSData *)aData

Parameters:

  • aData:

unwrapMessageFromData:offset:    (declared in ROMessageEnvelope)

for internal use; Must be implemented in concrete envelopes to unwrap a message from the given block of NSData at the specified offset.

- (NSData *) unwrapMessageFromData:(NSData *)aData offset:(long)aOffset

Parameters:

  • aData:
  • aOffset:

wrapMessage:toData:clientID:    (declared in ROMessageEnvelope)

for internal use; Must be implemented in a concrete envelope to wrap the given message data to the NSData. The ClientID is provided for reference, and may be encoded in the envelopes header, if needed for unwrapping on the remote side.

- (void) wrapMessage:(NSData *)aMessageData toData:(NSMutableData *)aData clientID:(ROGuid *)aClientID

Parameters:

  • aMessageData:
  • aData:
  • aClientID: