EMSecureContainerFactory
Objective-C
@protocol EMSecureContainerFactory <NSObject>
Swift
protocol EMSecureContainerFactory : NSObjectProtocol
Secure Container Factory
-
Create a secure string object from a String.
Declaration
Objective-C
- (id<EMSecureString>)secureStringFromString:(NSString *)string;Swift
func secureString(from string: String!) -> (any EMSecureString)!Parameters
stringThe string to securely store. The string will be converted to NSUTF8StringEncoding when stored in the ‘secure data’ object. String can’t be null
Return Value
A ‘secure data’ object that securely stores the data. @exception NSException When string is nil or if string encoding is not NSUTF8StringEncoding.
-
Create a secure string object from a String using a specific character set.
Warning: This method does not guarantee that the given string and the given encoding is compatible.
Declaration
Objective-C
- (id<EMSecureString>)secureStringFromString:(NSString *)string encoding:(NSStringEncoding)encoding;Swift
func secureString(from string: String!, encoding: UInt) -> (any EMSecureString)!Parameters
stringThe string to securely store. String can’t be null
encodingThe string will be converted to this encoding when stored in the ‘secure data’ object. It could be any NSStringEncoding, etc.
Return Value
A ‘secure data’ object that securely stores the data. @exception NSException When string is nil or if string encoding is not the one provided in encoding.
-
Create a secure string object from a NSData.
Declaration
Objective-C
- (id<EMSecureString>)secureStringFromData:(NSData *)data wipeSource:(BOOL)wipeSource;Swift
func secureString(from data: Data!, wipeSource: Bool) -> (any EMSecureString)!Parameters
dataData to securely store.
wipeSourceIf ‘true’, then the ‘data’ will be erased if the method returns successfully. Otherwise the input will not be modified.
Return Value
A ‘secure data’ object that securely stores the data.
-
Creates the secure byte array object.
Declaration
Objective-C
- (id<EMSecureByteArray>)secureByteArrayWithData:(NSData *)data wipeSource:(BOOL)wipeSource;Swift
func secureByteArray(with data: Data!, wipeSource: Bool) -> (any EMSecureByteArray)!Parameters
dataData to store to the output object.
wipeSourcePass
trueto wipe the original data.Return Value
The secure byte array object.
EMSecureContainerFactory Protocol Reference