Skip to content

Commit

Permalink
Import only sha1
Browse files Browse the repository at this point in the history
  • Loading branch information
jbrand42 authored and bitprophet committed Mar 11, 2022
1 parent cd65798 commit 0f90e5b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions paramiko/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
import re
import shlex
import socket
import hashlib
from hashlib import sha1
from functools import partial

from .py3compat import StringIO
Expand Down Expand Up @@ -436,10 +436,10 @@ def _tokenize(self, config, target_hostname, key, value):
# 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?
Expand Down

0 comments on commit 0f90e5b

Please sign in to comment.