Decryptor

public final class Decryptor : NSObject, RNCryptorType

Password-based decryptor that can handle any supported format.

  • Creates and returns a cryptor.

    Declaration

    Swift

    public init(password: String)

    Parameters

    password

    Non-empty password string. This will be interpretted as UTF-8.

  • Decrypt data using password and return decrypted data, invalidating decryptor. Throws if password is incorrect or ciphertext is in the wrong format. - throws Error

    Declaration

    Swift

    public func decryptData(data: NSData) throws -> NSData
  • Updates cryptor with data and returns processed data.

    Throws

    Error

    Declaration

    Swift

    public func updateWithData(data: NSData) throws -> NSData

    Parameters

    data

    Data to process. May be empty.

    Return Value

    Processed data. May be empty.

  • Returns trailing data and invalidates the cryptor.

    Throws

    Error

    Declaration

    Swift

    public func finalData() throws -> NSData

    Return Value

    Trailing data