Merge "Update decode_cipher doc text about encryption ciphers"

This commit is contained in:
Zuul 2021-06-22 17:07:43 +00:00 committed by Gerrit Code Review
commit d13728475a

View File

@ -944,9 +944,11 @@ def replace_xenserver_image_with_coalesced_vhd(image_file):
def decode_cipher(cipher_spec, key_size):
"""Decode a dm-crypt style cipher specification string
The assumed format being cipher[:keycount]-chainmode-ivmode[:ivopts] as
documented under linux/Documentation/device-mapper/dm-crypt.txt in the
kernel source tree.
The assumed format being cipher-chainmode-ivmode, similar to that
documented under
linux/Documentation/admin-guide/device-mapper/dm-crypt.txt in the
kernel source tree. Cinder does not support the [:keycount] or
[:ivopts] options.
"""
cipher_alg, cipher_mode, ivgen_alg = cipher_spec.split('-')
cipher_alg = cipher_alg + '-' + str(key_size)