I would like to know if the openssl library include a function for openssl passwd
command ?
For example I would like to create a hashed password using sha512 with a custom salt, corresponding command is openssl passwd -6 -salt xxxx password
. I search in the documentation but I didn't find anything, always talking about the command but not about the library.
Thanks in advance
There is no one function in the library, if you want to know what the command is doing, it points you to it in the help:
-5 -6
Use the SHA256 / SHA512 based algorithms defined by Ulrich Drepper. See https://www.akkadia.org/drepper/SHA-crypt.txt .
So it's using the openssl library to implement the SHA512 algorithm by Ulrich Drepper.
You can check out the source code here to see how it's done. Look for the shacrypt function which is implementing the Ulrich Drepper algorithm using the openssl library.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.