 }
 
 // Internal protocol for version-specific decryptors.
-private protocol VersionedDecryptorType: RNCryptorType {
+private protocol VersionedDecryptorType: CryptorType {
     static var preambleSize: Int { get }
     static func canDecrypt(preamble: NSData) -> Bool
     init(password: String)

    func finalData() throws -> NSData
}

public extension RNCryptorType {
    /// Simplified, generic interface to `RNCryptorType`. Takes a data,
    /// returns a processed data. Generally you should use
    /// `RNCryptor.encryptData(password:)`, or

    /// for code that is neutral on whether it is encrypting or decrypting.
    ///
    /// - throws: `Error`
    private func oneshot(data: NSData) throws -> NSData {
        let result = NSMutableData(data: try updateWithData(data))
        result.appendData(try finalData())
        return result
    }
}

private let CCErrorDomain = "com.apple.CommonCrypto"

