Aller au contenu

Static IV (ARCH9114)

Ce contenu n’est pas encore disponible dans votre langue.

Key swift.security.static-iv · Severity error · Category security · CWE CWE-329

Flags IVs / nonces built from string literals or zero-filled arrays.

let iv = [UInt8](repeating: 0, count: 16)
let nonce = AES.GCM.Nonce()

Generate a random nonce per encryption and store it with the ciphertext.