Python Security
Jump to navigation
Jump to search
HTTP Auth basic
import base64 import hashlib authorization_string = 'Basic ' + base64.b64encode(b"myuser:mypass").decode("ascii") hashlib.sha256(authorization_string.encode('utf-8')).hexdigest()
This would be used with Authorization: {authorization_string}