Browse Source

Use `.sha2(.sha256)` for PBKDF2 in readme

.sha256 is deprecated if I'm reading this right. 

Signed-off-by: Sam <sam.a.judd@gmail.com>
Sam 1 year ago
parent
commit
62b88be8bf
1 changed files with 1 additions and 1 deletions
  1. 1 1
      README.md

+ 1 - 1
README.md

@@ -316,7 +316,7 @@ try CMAC(key: key).authenticate(bytes)
 let password: Array<UInt8> = Array("s33krit".utf8)
 let salt: Array<UInt8> = Array("nacllcan".utf8)
 
-let key = try PKCS5.PBKDF2(password: password, salt: salt, iterations: 4096, keyLength: 32, variant: .sha256).calculate()
+let key = try PKCS5.PBKDF2(password: password, salt: salt, iterations: 4096, keyLength: 32, variant: .sha2(.sha256)).calculate()
 ```
 
 ```swift