Răsfoiți Sursa

Clearup initializer parameters

Marcin Krzyzanowski 5 ani în urmă
părinte
comite
39021ab5f2
1 a modificat fișierele cu 9 adăugiri și 0 ștergeri
  1. 9 0
      Sources/CryptoSwift/Foundation/AES+Foundation.swift

+ 9 - 0
Sources/CryptoSwift/Foundation/AES+Foundation.swift

@@ -17,6 +17,15 @@ import Foundation
 
 extension AES {
   /// Initialize with CBC block mode.
+  ///
+  /// - Parameters:
+  ///   - key: Key as a String.
+  ///   - iv: IV as a String.
+  ///   - padding: Padding
+  /// - Throws: Error
+  ///
+  /// The input is a String, that is treat as sequence of bytes made directly out of String.
+  /// If input is Base64 encoded data (which is a String technically) it is not decoded automatically for you.
   public convenience init(key: String, iv: String, padding: Padding = .pkcs7) throws {
     try self.init(key: key.bytes, blockMode: CBC(iv: iv.bytes), padding: padding)
   }