EMSecureString Protocol Reference

Conforms to EMSecureByteArray
Declared in EMSecureString.h

Overview

A protocol representing a secure container object in memory.

– stringValue required method

Returns a deep copy of the the value of data as an immutable NSString.

- (NSString *)stringValue

Return Value

An immutable NSString representation of the object.

Discussion

Warning: This method creates an immutable string which can be a potential security issue. Use CAREFULLY as this NSString cannot be wiped from memory even after sending -wipe to the EMSecureString object.

Declared In

EMSecureString.h

– stringLength required method

Returns the length of the data in number of characters.

- (NSUInteger)stringLength

Return Value

Number of characters in the string.

Declared In

EMSecureString.h

– append: required method

Appends EMSecureString object with another EMSecureString object.

- (id<EMSecureString>)append:(id<EMSecureString>)anotherString

Parameters

anotherString

The secure string to append.

Return Value

The new EMSecureString object containing the concatenation of the two secure strings.

Discussion

Warning: EMSecureString objects that has been created with a custom string encoding (using [EMSecureDataFactory secureStringWithString:encoding:]) cannot be the receiver or data argument of this method.

Declared In

EMSecureString.h