Encryptor
public final class Encryptor: NSObject, RNCryptorType
A encryptor for the latest data format. If compatibility with other RNCryptor
implementations is required, you may wish to use the specific encryptor version rather
than accepting latest.
-
Creates and returns a cryptor.
Declaration
Swift
public init(password: String)
Parameters
password
Non-empty password string. This will be interpretted as UTF-8.
-
Updates cryptor with data and returns processed data.
Declaration
Swift
public func updateWithData(data: NSData) -> NSData
Parameters
data
Data to process. May be empty.
Return Value
Processed data. May be empty.
-
Returns trailing data and invalidates the cryptor.
Declaration
Swift
public func finalData() -> NSData
Return Value
Trailing data
-
Simplified, generic interface to
RNCryptorType
. Takes a data, returns a processed data, and invalidates the cryptor.Declaration
Swift
public func encryptData(data: NSData) -> NSData