diff options
author | Jason Brand <jbrand42@users.noreply.github.com> | 2022-02-15 23:24:59 +0000 |
---|---|---|
committer | Jeff Forcier <jeff@bitprophet.org> | 2022-03-11 18:33:50 -0500 |
commit | 0f90e5bdd908bbace418045ddd35224283f16afe (patch) | |
tree | 5c437db2fe52ff415b427390079d465289737195 | |
parent | cd65798c2777e5ab5f15e96a672ccc238237ddcd (diff) |
Import only sha1
-rw-r--r-- | paramiko/config.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/paramiko/config.py b/paramiko/config.py index 0e3a5eaa..27fdca4f 100644 --- a/paramiko/config.py +++ b/paramiko/config.py @@ -27,7 +27,7 @@ import os import re import shlex import socket -import hashlib +from hashlib import sha1 from functools import partial from .py3compat import StringIO @@ -436,10 +436,10 @@ class SSHConfig(object): # The actual tokens! replacements = { # TODO: %%??? - "%C": hashlib.sha1((local_hostname + - target_hostname + - str(port) + - remoteuser).encode("utf-8")).hexdigest(), + "%C": sha1((local_hostname + + target_hostname + + str(port) + + remoteuser).encode("utf-8")).hexdigest(), "%d": homedir, "%h": configured_hostname, # TODO: %i? |