瀏覽代碼

Clearup initializer parameters

Marcin Krzyzanowski 5 年之前
父節點
當前提交
39021ab5f2
共有 1 個文件被更改,包括 9 次插入0 次删除
  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)
   }