瀏覽代碼

Remove unused ArraySliceUInt8+Bytes.swift

Marcin Krzyżanowski 9 年之前
父節點
當前提交
16942bd4dd
共有 2 個文件被更改,包括 0 次插入52 次删除
  1. 0 10
      CryptoSwift.xcodeproj/project.pbxproj
  2. 0 42
      Sources/CryptoSwift/ArraySliceUInt8+Bytes.swift

+ 0 - 10
CryptoSwift.xcodeproj/project.pbxproj

@@ -59,10 +59,6 @@
 		757BC9411C1CA5790093AAA9 /* Array+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 757BC91B1C1CA5790093AAA9 /* Array+Extension.swift */; };
 		757BC9421C1CA5790093AAA9 /* Array+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 757BC91B1C1CA5790093AAA9 /* Array+Extension.swift */; };
 		757BC9431C1CA5790093AAA9 /* Array+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 757BC91B1C1CA5790093AAA9 /* Array+Extension.swift */; };
-		757BC9441C1CA5790093AAA9 /* ArraySliceUInt8+Bytes.swift in Sources */ = {isa = PBXBuildFile; fileRef = 757BC91C1C1CA5790093AAA9 /* ArraySliceUInt8+Bytes.swift */; };
-		757BC9451C1CA5790093AAA9 /* ArraySliceUInt8+Bytes.swift in Sources */ = {isa = PBXBuildFile; fileRef = 757BC91C1C1CA5790093AAA9 /* ArraySliceUInt8+Bytes.swift */; };
-		757BC9461C1CA5790093AAA9 /* ArraySliceUInt8+Bytes.swift in Sources */ = {isa = PBXBuildFile; fileRef = 757BC91C1C1CA5790093AAA9 /* ArraySliceUInt8+Bytes.swift */; };
-		757BC9471C1CA5790093AAA9 /* ArraySliceUInt8+Bytes.swift in Sources */ = {isa = PBXBuildFile; fileRef = 757BC91C1C1CA5790093AAA9 /* ArraySliceUInt8+Bytes.swift */; };
 		757BC9481C1CA5790093AAA9 /* Authenticator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 757BC91D1C1CA5790093AAA9 /* Authenticator.swift */; };
 		757BC9491C1CA5790093AAA9 /* Authenticator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 757BC91D1C1CA5790093AAA9 /* Authenticator.swift */; };
 		757BC94A1C1CA5790093AAA9 /* Authenticator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 757BC91D1C1CA5790093AAA9 /* Authenticator.swift */; };
@@ -324,7 +320,6 @@
 		757BC8FD1C1CA56A0093AAA9 /* Utils+Foundation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Utils+Foundation.swift"; sourceTree = "<group>"; };
 		757BC91A1C1CA5790093AAA9 /* AES.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = AES.swift; path = Sources/CryptoSwift/AES.swift; sourceTree = SOURCE_ROOT; };
 		757BC91B1C1CA5790093AAA9 /* Array+Extension.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = "Array+Extension.swift"; path = "Sources/CryptoSwift/Array+Extension.swift"; sourceTree = SOURCE_ROOT; };
-		757BC91C1C1CA5790093AAA9 /* ArraySliceUInt8+Bytes.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = "ArraySliceUInt8+Bytes.swift"; path = "Sources/CryptoSwift/ArraySliceUInt8+Bytes.swift"; sourceTree = SOURCE_ROOT; };
 		757BC91D1C1CA5790093AAA9 /* Authenticator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = Authenticator.swift; path = Sources/CryptoSwift/Authenticator.swift; sourceTree = SOURCE_ROOT; };
 		757BC91F1C1CA5790093AAA9 /* BytesSequence.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = BytesSequence.swift; path = Sources/CryptoSwift/BytesSequence.swift; sourceTree = SOURCE_ROOT; };
 		757BC9201C1CA5790093AAA9 /* ChaCha20.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ChaCha20.swift; path = Sources/CryptoSwift/ChaCha20.swift; sourceTree = SOURCE_ROOT; };
@@ -446,7 +441,6 @@
 			children = (
 				757BC91A1C1CA5790093AAA9 /* AES.swift */,
 				757BC91B1C1CA5790093AAA9 /* Array+Extension.swift */,
-				757BC91C1C1CA5790093AAA9 /* ArraySliceUInt8+Bytes.swift */,
 				757BC91D1C1CA5790093AAA9 /* Authenticator.swift */,
 				80545D121CA9FECD00474A99 /* Bit.swift */,
 				757BC91F1C1CA5790093AAA9 /* BytesSequence.swift */,
@@ -799,7 +793,6 @@
 				757BC9611C1CA5790093AAA9 /* CRC.swift in Sources */,
 				757BC9A11C1CA5790093AAA9 /* Poly1305.swift in Sources */,
 				75CB93451C8F603C0087740D /* CTR.swift in Sources */,
-				757BC9451C1CA5790093AAA9 /* ArraySliceUInt8+Bytes.swift in Sources */,
 				753881EC1CB06E390089101D /* NoPadding.swift in Sources */,
 				758F58F21C8FB6E20054C377 /* OFB.swift in Sources */,
 				757BC9BD1C1CA5790093AAA9 /* UInt64Extension.swift in Sources */,
@@ -854,7 +847,6 @@
 				757BC9601C1CA5790093AAA9 /* CRC.swift in Sources */,
 				757BC9A01C1CA5790093AAA9 /* Poly1305.swift in Sources */,
 				75CB93441C8F603C0087740D /* CTR.swift in Sources */,
-				757BC9441C1CA5790093AAA9 /* ArraySliceUInt8+Bytes.swift in Sources */,
 				757BC9BC1C1CA5790093AAA9 /* UInt64Extension.swift in Sources */,
 				753881EB1CB06E390089101D /* NoPadding.swift in Sources */,
 				758F58F11C8FB6E20054C377 /* OFB.swift in Sources */,
@@ -927,7 +919,6 @@
 				757BC9621C1CA5790093AAA9 /* CRC.swift in Sources */,
 				757BC9A21C1CA5790093AAA9 /* Poly1305.swift in Sources */,
 				75CB93461C8F603C0087740D /* CTR.swift in Sources */,
-				757BC9461C1CA5790093AAA9 /* ArraySliceUInt8+Bytes.swift in Sources */,
 				753881EE1CB06E390089101D /* NoPadding.swift in Sources */,
 				758F58F31C8FB6E20054C377 /* OFB.swift in Sources */,
 				757BC9BE1C1CA5790093AAA9 /* UInt64Extension.swift in Sources */,
@@ -983,7 +974,6 @@
 				757BC9631C1CA5790093AAA9 /* CRC.swift in Sources */,
 				757BC9A31C1CA5790093AAA9 /* Poly1305.swift in Sources */,
 				75CB93471C8F603C0087740D /* CTR.swift in Sources */,
-				757BC9471C1CA5790093AAA9 /* ArraySliceUInt8+Bytes.swift in Sources */,
 				753881ED1CB06E390089101D /* NoPadding.swift in Sources */,
 				758F58F41C8FB6E20054C377 /* OFB.swift in Sources */,
 				757BC9BF1C1CA5790093AAA9 /* UInt64Extension.swift in Sources */,

+ 0 - 42
Sources/CryptoSwift/ArraySliceUInt8+Bytes.swift

@@ -1,42 +0,0 @@
-//
-//  ArraySlice.swift
-//  CryptoSwift
-//
-//  Created by Marcin Krzyzanowski on 27/09/15.
-//  Copyright © 2015 Marcin Krzyzanowski. All rights reserved.
-//
-//  Disabled because performance is bad. The cost of generic approach is to big.
-
-/*
-extension ArraySlice where Element: _UInt8Type {
-
-    func toUInt32Array() -> Array<UInt32> {
-        var result = Array<UInt32>()
-        result.reserveCapacity(16)
-        
-        for idx in self.startIndex.stride(to: self.endIndex, by: sizeof(UInt32)) {
-            let val:UInt32 = (UInt32(self[idx.advancedBy(3)] as! UInt8) << 24) | (UInt32(self[idx.advancedBy(2)] as! UInt8) << 16) | (UInt32(self[idx.advancedBy(1)] as! UInt8) << 8) | UInt32(self[idx] as! UInt8)
-            result.append(val)
-        }
-        return result
-    }
-    
-    func toUInt64Array() -> Array<UInt64> {
-        var result = Array<UInt64>()
-        result.reserveCapacity(32)
-        for idx in self.startIndex.stride(to: self.endIndex, by: sizeof(UInt64)) {
-            var val:UInt64 = 0
-            val |= UInt64(self[idx.advancedBy(7)] as! UInt8) << 56
-            val |= UInt64(self[idx.advancedBy(6)] as! UInt8) << 48
-            val |= UInt64(self[idx.advancedBy(5)] as! UInt8) << 40
-            val |= UInt64(self[idx.advancedBy(4)] as! UInt8) << 32
-            val |= UInt64(self[idx.advancedBy(3)] as! UInt8) << 24
-            val |= UInt64(self[idx.advancedBy(2)] as! UInt8) << 16
-            val |= UInt64(self[idx.advancedBy(1)] as! UInt8) << 8
-            val |= UInt64(self[idx.advancedBy(0)] as! UInt8) << 0
-            result.append(val)
-        }
-        return result
-    }
-}
-*/