def _decrypt_encrypted_data(encryption_algorithm_info, encrypted_content, password):
decrypt_func = crypto_funcs[encryption_algorithm_info.encryption_cipher]<EOL>if encryption_algorithm_info.kdf == '<STR_LIT>':<EOL><INDENT>if encryption_algorithm_info.encryption_cipher == '<STR_LIT>':<EOL><INDENT>raise ValueError(pretty_message(<EOL>'''<STR_LIT>'''<EOL>))<EOL><DEDENT>enc_key = pbkdf2(<EOL>encryption_algorithm_info.kdf_hmac,<EOL>password,<EOL>encryption_algorithm_info.kdf_salt,<EOL>encryption_algorithm_info.kdf_iterations,<EOL>encryption_algorithm_info.key_length<EOL>)<EOL>enc_iv = encryption_algorithm_info.encryption_iv<EOL>plaintext = decrypt_func(enc_key, encrypted_content, enc_iv)<EOL><DEDENT>elif encryption_algorithm_info.kdf == '<STR_LIT>':<EOL><INDENT>derived_output = pbkdf1(<EOL>encryption_algorithm_info.kdf_hmac,<EOL>password,<EOL>encryption_algorithm_info.kdf_salt,<EOL>encryption_algorithm_info.kdf_iterations,<EOL>encryption_algorithm_info.key_length + <NUM_LIT:8><EOL>)<EOL>enc_key = derived_output[<NUM_LIT:0>:<NUM_LIT:8>]<EOL>enc_iv = derived_output[<NUM_LIT:8>:<NUM_LIT:16>]<EOL>plaintext = decrypt_func(enc_key, encrypted_content, enc_iv)<EOL><DEDENT>elif encryption_algorithm_info.kdf == '<STR_LIT>':<EOL><INDENT>enc_key = pkcs12_kdf(<EOL>encryption_algorithm_info.kdf_hmac,<EOL>password,<EOL>encryption_algorithm_info.kdf_salt,<EOL>encryption_algorithm_info.kdf_iterations,<EOL>encryption_algorithm_info.key_length,<EOL><NUM_LIT:1>  <EOL>)<EOL>if encryption_algorithm_info.encryption_cipher == '<STR_LIT>':<EOL><INDENT>plaintext = decrypt_func(enc_key, encrypted_content)<EOL><DEDENT>else:<EOL><INDENT>enc_iv = pkcs12_kdf(<EOL>encryption_algorithm_info.kdf_hmac,<EOL>password,<EOL>encryption_algorithm_info.kdf_salt,<EOL>encryption_algorithm_info.kdf_iterations,<EOL>encryption_algorithm_info.encryption_block_size,<EOL><NUM_LIT:2>   <EOL>)<EOL>plaintext = decrypt_func(enc_key, encrypted_content, enc_iv)<EOL><DEDENT><DEDENT>return plaintext<EOL>
Decrypts encrypted ASN.1 data

:param encryption_algorithm_info:
    An instance of asn1crypto.pkcs5.Pkcs5EncryptionAlgorithm

:param encrypted_content:
    A byte string of the encrypted content

:param password:
    A byte string of the encrypted content's password

:return:
    A byte string of the decrypted plaintext