Procházet zdrojové kódy

Conforms to ExpressibleByArrayLiteral

Marcin Krzyżanowski před 9 roky
rodič
revize
7183233c49
1 změnil soubory, kde provedl 6 přidání a 0 odebrání
  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)
     }
 }
+
+extension SecureBytes: ExpressibleByArrayLiteral {
+    public convenience init(arrayLiteral elements: UInt8...) {
+        self.init(bytes: elements)
+    }
+}