)]}'
{"trove/common/crypto_utils.py":[{"author":{"_account_id":27733,"name":"Krzysztof Opasiak","email":"k.opasiak@samsung.com","username":"kopasiak"},"change_message_id":"036d98c19d750e5171f694ef8ddbe7434cf8cebc","unresolved":false,"context_lines":[{"line_number":94,"context_line":"    data \u003d encodeutils.to_utf8(data)"},{"line_number":95,"context_line":"    key \u003d encodeutils.to_utf8(key)"},{"line_number":96,"context_line":"    md5_key \u003d encodeutils.safe_encode(hashlib.md5(key).hexdigest())"},{"line_number":97,"context_line":"    iv \u003d os.urandom(iv_bit_count)"},{"line_number":98,"context_line":"    iv \u003d iv[:iv_bit_count]"},{"line_number":99,"context_line":"    data \u003d pad_for_encryption(data, iv_bit_count)"},{"line_number":100,"context_line":"    encrypted \u003d _encrypt(md5_key, bytes(iv), data)"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_796c7a9b","line":97,"range":{"start_line":97,"start_character":20,"end_line":97,"end_character":33},"updated":"2018-05-14 17:40:58.000000000","message":"Please correct me if I\u0027m wrong but isn\u0027t iv_bit_count a number of bytes instead of number of bits as name suggests? Shouldn\u0027t it be called iv_byte_count?","commit_id":"072ca3af735b7e3745290b9bf2d51980fa331bf8"},{"author":{"_account_id":13157,"name":"Zhao Chao","email":"zhaochao1984@gmail.com","username":"zhaochao"},"change_message_id":"c1953012de203f1a4699ace24144dbbdae9df717","unresolved":false,"context_lines":[{"line_number":94,"context_line":"    data \u003d encodeutils.to_utf8(data)"},{"line_number":95,"context_line":"    key \u003d encodeutils.to_utf8(key)"},{"line_number":96,"context_line":"    md5_key \u003d encodeutils.safe_encode(hashlib.md5(key).hexdigest())"},{"line_number":97,"context_line":"    iv \u003d os.urandom(iv_bit_count)"},{"line_number":98,"context_line":"    iv \u003d iv[:iv_bit_count]"},{"line_number":99,"context_line":"    data \u003d pad_for_encryption(data, iv_bit_count)"},{"line_number":100,"context_line":"    encrypted \u003d _encrypt(md5_key, bytes(iv), data)"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_8d5e9543","line":97,"range":{"start_line":97,"start_character":20,"end_line":97,"end_character":33},"in_reply_to":"5f7c97a3_796c7a9b","updated":"2018-05-18 06:23:07.000000000","message":"Yes, you\u0027re right. The unit of initialization_vector should be bytes. I\u0027ll also update this.\n\nThanks.","commit_id":"072ca3af735b7e3745290b9bf2d51980fa331bf8"},{"author":{"_account_id":22608,"name":"zhanggang","email":"zhanggang@cmss.chinamobile.com","username":"zhanggang"},"change_message_id":"2ac01019ed41ef606fe561bf941aba93080583a5","unresolved":false,"context_lines":[{"line_number":21,"context_line":"# like RHEL6."},{"line_number":22,"context_line":"# This try_and_fallback method is inspired by:"},{"line_number":23,"context_line":"# https://review.openstack.org/#/c/331828/"},{"line_number":24,"context_line":"try:"},{"line_number":25,"context_line":"    from cryptography.hazmat.backends import default_backend"},{"line_number":26,"context_line":"    from cryptography.hazmat.primitives.ciphers import algorithms"},{"line_number":27,"context_line":"    from cryptography.hazmat.primitives.ciphers import Cipher"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f7c97a3_80614aab","line":24,"range":{"start_line":24,"start_character":3,"end_line":24,"end_character":4},"updated":"2018-06-07 02:42:50.000000000","message":"If we decided so, not sure is it necessary to use a try...except here, since there is no Crypto anymore.","commit_id":"0de00f18f19b501060790bb93388c6d68d7e6709"}]}
