Merge "Reuse method to convert key to passphrase"

This commit is contained in:
Jenkins
2015-11-18 22:34:50 +00:00
committed by Gerrit Code Review

View File

@@ -53,6 +53,7 @@ class CryptsetupEncryptor(base.VolumeEncryptor):
self.dev_path = os.path.realpath(self.symlink_path)
def _get_passphrase(self, key):
"""Convert raw key to string."""
return ''.join(hex(x).replace('0x', '') for x in key)
def _open_volume(self, passphrase, **kwargs):