New course! Every coder should learn Generative AI!
Try a free lesson+ 6
You can use hashlib, a module of python. Here you can see a sample (use second one):
https://www.tutorialspoint.com/cryptography_with_python/cryptography_with_python_modules_of_cryptography.htm