How to reproduce System.Security.Cryptography.SHA1Managed result in Python

后端 未结 5 705
梦毁少年i
梦毁少年i 2021-01-17 03:07

Here\'s the deal: I\'m moving a .NET website to Python. I have a database with passwords hashed using the System.Security.Cryptography.SHA1Managed utility.

I\'m cre

5条回答
  •  無奈伤痛
    2021-01-17 03:48

    According to this previous thread, this should be something like sha1(password+salt)+salt. SHA-1 output is twenty bytes, so for 48 bytes this should be a 28-byte salt, not an 8-byte salt, unless some sort of encoding was used.

提交回复
热议问题