Merge "Refactor key generation to handle both normal and metadata encryption." am: 8e0780cb am: 79b85355 Change-Id: I644d55df9c5a5441ead5b6790efff159b292c957