Browse Source

Mark few protocols as class-protocols

Marcin Krzyżanowski 9 years ago
parent
commit
24a7635f91

+ 2 - 2
Sources/CryptoSwift/BlockCipher.swift

@@ -6,6 +6,6 @@
 //  Copyright © 2016 Marcin Krzyzanowski. All rights reserved.
 //
 
-protocol BlockCipher {
+protocol BlockCipher: class {
     static var blockSize: Int { get }
-}
+}

+ 1 - 1
Sources/CryptoSwift/Cipher.swift

@@ -11,7 +11,7 @@ public enum CipherError: Error {
     case decrypt
 }
 
-public protocol Cipher {
+public protocol Cipher: class {
     /// Encrypt given bytes at once
     ///
     /// - parameter bytes: Plaintext data

+ 1 - 1
Sources/CryptoSwift/Cryptors.swift

@@ -12,7 +12,7 @@
     import Darwin
 #endif
 
-public protocol Cryptors {
+public protocol Cryptors: class {
     associatedtype EncryptorType: UpdatableCryptor
     associatedtype DecryptorType: UpdatableCryptor
 

+ 1 - 1
Sources/CryptoSwift/HashProtocol.swift

@@ -6,7 +6,7 @@
 //  Copyright (c) 2014 Marcin Krzyzanowski. All rights reserved.
 //
 
-internal protocol HashProtocol {
+internal protocol HashProtocol: class {
     var message: Array<UInt8> { get }
     
     /** Common part for hash calculation. Prepare header data. */

+ 1 - 1
Sources/CryptoSwift/UpdatableCryptor.swift

@@ -52,4 +52,4 @@ extension UpdatableCryptor {
             output(processed)
         }
     }
-}
+}