Преглед на файлове

Conforms to ExpressibleByArrayLiteral

Marcin Krzyżanowski преди 8 години
родител
ревизия
7183233c49
променени са 1 файла, в които са добавени 6 реда и са изтрити 0 реда
  1. 6 0
      Sources/CryptoSwift/SecureBytes.swift

+ 6 - 0
Sources/CryptoSwift/SecureBytes.swift

@@ -60,3 +60,9 @@ extension SecureBytes: Collection {
         return self.bytes.index(after: i)
         return self.bytes.index(after: i)
     }
     }
 }
 }
+
+extension SecureBytes: ExpressibleByArrayLiteral {
+    public convenience init(arrayLiteral elements: UInt8...) {
+        self.init(bytes: elements)
+    }
+}