Insecure hashing
A hashing algorithm is weak if it is easy to determine the original input from the hash or to find another input that yields the same hash. Weak hashing algorithms can lead to security vulnerabilities.
def hashing_noncompliant():
    import hashlib
    from hashlib import pbkdf2_hmac
    # Noncompliant: insecure hashing algorithm used.
    derivedkey = hashlib.pbkdf2_hmac('sha224', password, salt, 100000)
    derivedkey.hex()
def hashing_compliant():
    import hashlib
    from hashlib import pbkdf2_hmac
    # Compliant: secure hashing algorithm used.
    derivedkey = hashlib.pbkdf2_hmac('sha256', password, salt, 100000)
    derivedkey.hex()