From 0f90e5bdd908bbace418045ddd35224283f16afe Mon Sep 17 00:00:00 2001 From: Jason Brand Date: Tue, 15 Feb 2022 23:24:59 +0000 Subject: Import only sha1 --- paramiko/config.py | 10 +++++----- 1 file 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? -- cgit v1.2.3