)]}'
{"glance/common/crypt.py":[{"author":{"_account_id":21722,"name":"Dharini Chandrasekar","email":"dharini.chandrasekar@intel.com","username":"dharinic"},"change_message_id":"934fc31d72b338c97b2b2140ee7a461deef094b4","unresolved":false,"context_lines":[{"line_number":21,"context_line":"import os"},{"line_number":22,"context_line":"import random"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"from cryptography.hazmat.backends import default_backend"},{"line_number":25,"context_line":"from cryptography.hazmat.primitives.ciphers import algorithms"},{"line_number":26,"context_line":"from cryptography.hazmat.primitives.ciphers import Cipher"},{"line_number":27,"context_line":"from cryptography.hazmat.primitives.ciphers import modes"}],"source_content_type":"text/x-python","patch_set":2,"id":"dfeb2761_19ccf687","line":24,"range":{"start_line":24,"start_character":41,"end_line":24,"end_character":56},"updated":"2017-04-03 18:51:52.000000000","message":"I think we should not import a method.\n\nhttps://docs.openstack.org/developer/hacking/#imports","commit_id":"5ebde9079b34544cc6642a73b40ec865bcef8580"},{"author":{"_account_id":7764,"name":"Peter Hamilton","email":"peter.hamilton@jhuapl.edu","username":"Peter"},"change_message_id":"9c8f95060cbd420acf53b54f1efe238d1cdcf490","unresolved":false,"context_lines":[{"line_number":21,"context_line":"import os"},{"line_number":22,"context_line":"import random"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"from cryptography.hazmat.backends import default_backend"},{"line_number":25,"context_line":"from cryptography.hazmat.primitives.ciphers import algorithms"},{"line_number":26,"context_line":"from cryptography.hazmat.primitives.ciphers import Cipher"},{"line_number":27,"context_line":"from cryptography.hazmat.primitives.ciphers import modes"}],"source_content_type":"text/x-python","patch_set":2,"id":"dfeb2761_8a7ccbb5","line":24,"range":{"start_line":24,"start_character":41,"end_line":24,"end_character":56},"in_reply_to":"dfeb2761_19ccf687","updated":"2017-04-03 18:56:23.000000000","message":"I think this can go either way. FWIW, the import above is the way the cryptography docs handle using the default backend.","commit_id":"5ebde9079b34544cc6642a73b40ec865bcef8580"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"7ef23ea9919a2150d527a9d6cc3454047969fe1d","unresolved":false,"context_lines":[{"line_number":21,"context_line":"import os"},{"line_number":22,"context_line":"import random"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"from cryptography.hazmat.backends import default_backend"},{"line_number":25,"context_line":"from cryptography.hazmat.primitives.ciphers import algorithms"},{"line_number":26,"context_line":"from cryptography.hazmat.primitives.ciphers import Cipher"},{"line_number":27,"context_line":"from cryptography.hazmat.primitives.ciphers import modes"}],"source_content_type":"text/x-python","patch_set":2,"id":"dfeb2761_fe579c01","line":24,"range":{"start_line":24,"start_character":41,"end_line":24,"end_character":56},"in_reply_to":"dfeb2761_19ccf687","updated":"2017-04-03 18:58:28.000000000","message":"Since we\u0027re using the hazmat part of the library, I want to be extremely careful about what we import and what we\u0027re using.  Importing this function ensures that someone can\u0027t use a different backend later in the file without also modifying this line, which will be a very obvious change that reviewers should notice.  So I\u0027d like to make this an exception, if the reviewers agree.","commit_id":"5ebde9079b34544cc6642a73b40ec865bcef8580"},{"author":{"_account_id":15524,"name":"dane-fichter","email":"dane.fichter@jhuapl.edu","username":"dane-fichter"},"change_message_id":"69f749b9dee54d9ea852988cec86fc6009b39a72","unresolved":false,"context_lines":[{"line_number":21,"context_line":"import os"},{"line_number":22,"context_line":"import random"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"from cryptography.hazmat.backends import default_backend"},{"line_number":25,"context_line":"from cryptography.hazmat.primitives.ciphers import algorithms"},{"line_number":26,"context_line":"from cryptography.hazmat.primitives.ciphers import Cipher"},{"line_number":27,"context_line":"from cryptography.hazmat.primitives.ciphers import modes"}],"source_content_type":"text/x-python","patch_set":2,"id":"dfeb2761_143581f7","line":24,"range":{"start_line":24,"start_character":41,"end_line":24,"end_character":56},"in_reply_to":"dfeb2761_7ec02c7c","updated":"2017-04-03 20:41:29.000000000","message":"Strongly agree with Brian. This is the recommended pattern for interacting with cryptography\u0027s hazmat module.","commit_id":"5ebde9079b34544cc6642a73b40ec865bcef8580"},{"author":{"_account_id":21722,"name":"Dharini Chandrasekar","email":"dharini.chandrasekar@intel.com","username":"dharinic"},"change_message_id":"648c8a051b4a023fc124f2d7ca5792f24f94063d","unresolved":false,"context_lines":[{"line_number":21,"context_line":"import os"},{"line_number":22,"context_line":"import random"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"from cryptography.hazmat.backends import default_backend"},{"line_number":25,"context_line":"from cryptography.hazmat.primitives.ciphers import algorithms"},{"line_number":26,"context_line":"from cryptography.hazmat.primitives.ciphers import Cipher"},{"line_number":27,"context_line":"from cryptography.hazmat.primitives.ciphers import modes"}],"source_content_type":"text/x-python","patch_set":2,"id":"dfeb2761_7ec02c7c","line":24,"range":{"start_line":24,"start_character":41,"end_line":24,"end_character":56},"in_reply_to":"dfeb2761_fe579c01","updated":"2017-04-03 19:01:48.000000000","message":"Thanks for clarifying Brian.","commit_id":"5ebde9079b34544cc6642a73b40ec865bcef8580"},{"author":{"_account_id":12807,"name":"Steve Lewis (stevelle)","email":"stevelle@gmail.com","username":"stevelle"},"change_message_id":"6ae17dd4f07d5e7cd1849d7a566aea9f1a698517","unresolved":false,"context_lines":[{"line_number":50,"context_line":"        # NOTE(rosmaita): I know this looks stupid, but we can\u0027t just"},{"line_number":51,"context_line":"        # use os.urandom() to get the bytes because we use char(0) as"},{"line_number":52,"context_line":"        # a delimiter"},{"line_number":53,"context_line":"        pad \u003d b\u0027\u0027.join(six.int2byte(random.SystemRandom().randint(1, 0xFF))"},{"line_number":54,"context_line":"                       for i in range(pad_length - 1))"},{"line_number":55,"context_line":"        # We use chr(0) as a delimiter between text and padding"},{"line_number":56,"context_line":"        return text + b\u0027\\0\u0027 + pad"}],"source_content_type":"text/x-python","patch_set":2,"id":"dfeb2761_04d554b9","line":53,"range":{"start_line":53,"start_character":36,"end_line":53,"end_character":57},"updated":"2017-04-03 18:15:07.000000000","message":"acceptable, as it uses os.urandom() underneath","commit_id":"5ebde9079b34544cc6642a73b40ec865bcef8580"}],"glance/tests/unit/test_misc.py":[{"author":{"_account_id":7012,"name":"Brianna Poulos","email":"Brianna.Poulos@jhuapl.edu","username":"brianna-poulos"},"change_message_id":"fc536c50863e701ab0778b28db4c803f9d6447bb","unresolved":false,"context_lines":[{"line_number":53,"context_line":"                # TODO(rosmaita): the following will be removed before"},{"line_number":54,"context_line":"                # this patch is merged.  It\u0027s here on this patch set"},{"line_number":55,"context_line":"                # because I couldn\u0027t think of a different way to show"},{"line_number":56,"context_line":"                # interoperability once pycrypto is removed"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"                # show that the \"old\" pycrypto decryptor correctly decodes"},{"line_number":59,"context_line":"                # text output by the \"new\" encryptor"}],"source_content_type":"text/x-python","patch_set":1,"id":"ffe62b97_137029a5","line":56,"updated":"2017-03-24 21:37:48.000000000","message":"Looks like this test passes: \n\nhttp://logs.openstack.org/01/449401/1/check/gate-glance-python27-ubuntu-xenial/df35647/console.html#_2017-03-24_12_48_20_592079","commit_id":"49f9c5e2a82141a8aaf6dd044fe1ddeec7add8db"}]}
