Now that we convert salt inside of do_encryptas needed, keep salt as text type until then.

This commit is contained in:
Toshio Kuratomi 2016-10-20 13:48:20 -07:00
commit 6d9f780937
2 changed files with 6 additions and 5 deletions

View file

@ -248,8 +248,7 @@ class LookupModule(LookupBase):
_write_password_file(b_path, content)
if params['encrypt']:
password = do_encrypt(plaintext_password, params['encrypt'],
salt=to_bytes(salt, encoding='ascii', errors='strict'))
password = do_encrypt(plaintext_password, params['encrypt'], salt=salt)
ret.append(password)
else:
ret.append(plaintext_password)