diff options
author | Pierce Lopez <pierce.lopez@gmail.com> | 2017-09-03 22:58:27 -0400 |
---|---|---|
committer | Pierce Lopez <pierce.lopez@gmail.com> | 2017-09-03 22:58:27 -0400 |
commit | fc0d9818c04ddb99d340781004f63b46d19fdef7 (patch) | |
tree | 5d340fdf97087a66aec8354069cfa9de0bbb1a42 | |
parent | f58b5b83b202d638ace962ad3ed5a2fbfe696399 (diff) |
ensure ed25519 password is bytes
fixes #1039
-rw-r--r-- | paramiko/ed25519key.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/paramiko/ed25519key.py b/paramiko/ed25519key.py index a50d68bc..1557c5b2 100644 --- a/paramiko/ed25519key.py +++ b/paramiko/ed25519key.py @@ -25,6 +25,7 @@ import six from paramiko.message import Message from paramiko.pkey import PKey +from paramiko.py3compat import b from paramiko.ssh_exception import SSHException, PasswordRequiredException @@ -113,7 +114,7 @@ class Ed25519Key(PKey): else: cipher = Transport._cipher_info[ciphername] key = bcrypt.kdf( - password=password, + password=b(password), salt=bcrypt_salt, desired_key_bytes=cipher["key-size"] + cipher["block-size"], rounds=bcrypt_rounds, |