I am working on my first real coding project and would like to create a tool to encode my login information for my personal VPN based on the date and possibly time. I'm doing this so that even if I log into my server with compromised wifi my server would still be safe.
from datetime import date
today = date.today()
today = str(today).replace('-', '')
import hashlib
imput = "password"
h = hashlib.sha256(imput.encode(today))
hash = h.hexdigest()
print(hash)
The error I get while working on this is:
h = hashlib.sha256(imput.encode(today))
LookupError: unknown encoding: 20201017
I know this is a very basic issue but I am just barely learning so any help getting this functional would be great.