[Tutor] Verifying password hash is SHA512

Alan Gauld alan.gauld at yahoo.co.uk
Tue Nov 16 18:39:27 EST 2021


On 16/11/2021 18:11, Ken Lai wrote:
> Hi All,
> 
> I have a program that hashes passwords into SHA512, but I need to confirm.
> I found PHP code on the net:
> 
> $hashed = hash("sha512", $password);
> 
> Does Python have an equivalent?

Probably not equivalent but it does have the crypt module which
supports SHA512. It might do what you need?


-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos




More information about the Tutor mailing list