Prechádzať zdrojové kódy

Add information about used polynomial in CRC32. Fixes #346

Marcin Krzyzanowski 7 rokov pred
rodič
commit
70d99546ee

+ 2 - 1
Sources/CryptoSwift/Checksum.swift

@@ -110,7 +110,8 @@ public final class Checksum {
 // MARK: Public interface
 
 public extension Checksum {
-    /// Calculate CRC32
+    /// Calculate CRC32.
+    /// Polynomial: 0xEDB88320 (Reversed) - IEEE
     ///
     /// - parameter message: Message
     /// - parameter seed:    Seed value (Optional)

+ 1 - 0
Sources/CryptoSwift/PKCS/PBKDF2.swift

@@ -44,6 +44,7 @@ public extension PKCS5 {
         ///   - variant: hash variant
         ///   - iterations: iteration count, a positive integer
         ///   - keyLength: intended length of derived key
+        ///   - variant: MAC variant. Defaults to SHA256
         public init(password: Array<UInt8>, salt: Array<UInt8>, iterations: Int = 4096 /* c */, keyLength: Int? = nil /* dkLen */, variant: HMAC.Variant = .sha256) throws {
             precondition(iterations > 0)