EMSecureString
Objective-C
@protocol EMSecureString <EMSecureByteArray>
Swift
protocol EMSecureString : EMSecureByteArray
A protocol representing a secure container object in memory.
-
Returns a deep copy of the the value of data as an immutable
NSString.Warning
This method creates an immutable string which can be a potential security issue. Use CAREFULLY as thisNSStringcannot be wiped from memory even after sending -wipe to theEMSecureStringobject.Declaration
Objective-C
- (NSString *)stringValue;Swift
func stringValue() -> String!Return Value
An immutable
NSStringrepresentation of the object. -
Returns the length of the data in number of characters.
Declaration
Objective-C
- (NSUInteger)stringLength;Swift
func stringLength() -> UIntReturn Value
Number of characters in the string.
-
Appends
EMSecureStringobject with anotherEMSecureStringobject.Warning
EMSecureStringobjects that has been created with a custom string encoding (using [EMSecureDataFactory secureStringWithString:encoding:]) cannot be the receiver or data argument of this method.Declaration
Objective-C
- (id<EMSecureString>)append:(id<EMSecureString>)anotherString;Swift
func append(_ anotherString: (any EMSecureString)!) -> (any EMSecureString)!Parameters
anotherStringThe secure string to append.
Return Value
The new
EMSecureStringobject containing the concatenation of the two secure strings.
EMSecureString Protocol Reference