RNCryptor
public class RNCryptor: NSObject
RNCryptor encryption/decryption interface.
-
Encrypt data using password and return encrypted data.
Declaration
Swift
public static func encryptData(data: NSData, password: String) -> NSData
-
Decrypt data using password and return decrypted data. Throws if password is incorrect or ciphertext is in the wrong format. - throws
Error
Declaration
Swift
public static func decryptData(data: NSData, password: String) throws -> NSData
-
Generates random NSData of given length Crashes if
length
is larger than allocatable memory, or if the system random number generator is not available.Declaration
Swift
public static func randomDataOfLength(length: Int) -> NSData
-
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
See morelatest.
Declaration
Swift
public final class Encryptor: NSObject, RNCryptorType
-
Password-based decryptor that can handle any supported format.
See moreDeclaration
Swift
public final class Decryptor : NSObject, RNCryptorType
-
V3 format settings
See moreDeclaration
Swift
public final class FormatV3: NSObject
-
Format version 3 decryptor. This is required in order to decrypt using keys (since key configuration is version-specific). For password decryption,
See moreDecryptor
is generally preferred, and will call this if appropriate.Declaration
Swift
public final class DecryptorV3: NSObject, VersionedDecryptorType