Browse Source

Removed both redundant inheritance of CryptoHash enum and values assign to cases.

Tomasz Szulc 11 years ago
parent
commit
8dc0e60702
1 changed files with 4 additions and 8 deletions
  1. 4 8
      CryptoSwift/CryptoHash.swift

+ 4 - 8
CryptoSwift/CryptoHash.swift

@@ -8,14 +8,10 @@
 
 import Foundation
 
-public enum CryptoHash: Int {
-    case md5 = 1
-    case sha1 = 2
-    case sha224 = 3
-    case sha256 = 4
-    case sha384 = 5
-    case sha512 = 6
-    case ripemd160 = 7
+public enum CryptoHash {
+    case md5
+    case sha1, sha224, sha256, sha384, sha512
+    case ripemd160
     
     public func hash(data: NSData) -> NSData! {
         switch self {