VirtualBox

Changeset 102375 in vbox for trunk/include/iprt/crypto


Ignore:
Timestamp:
Nov 29, 2023 10:58:18 AM (15 months ago)
Author:
vboxsync
Message:

IPRT/crypto: Implemented handing-in crypt password strings as the salt into RTCrShaCrypt256/512(). This approach is used by many *crypt implementations -- it allows feeding the user-provided password and the crypted password from "the password file" to the function. If it returns the same crypted password then the user-provided password must be the correct one.Extended testcases. bugref:10551

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/crypto/shacrypt.h

    r102361 r102375  
    7777 * @param   pszSalt             Salt to use.
    7878 *                              Must be >= RT_SHACRYPT_MIN_SALT_LEN and <= RT_SHACRYPT_MAX_SALT_LEN.
    79  * @param   cRounds             Number of rounds to use.  @sa RT_SHACRYPT_DEFAULT_ROUNDS
     79 *
     80 *                              This parameter also accepts crypted password strings produced by RTCrShaCrypt256ToString().
     81 *
     82 *                              This approach is used by many *crypt implementations -- it allows feeding the user-provided
     83 *                              password and the crypted password from "the password file" to the function. If it returns the
     84 *                              same crypted password then the user-provided password must be the correct one.
     85 * @param   cRounds             Number of rounds to use. @sa RT_SHACRYPT_DEFAULT_ROUNDS
    8086 * @param   abHash              Where to return the hash on success.
    8187 *
     
    108114 * @param   pszSalt             Salt to use.
    109115 *                              Must be >= RT_SHACRYPT_MIN_SALT_LEN and <= RT_SHACRYPT_MAX_SALT_LEN.
     116 *
     117 *                              This parameter also accepts crypted password strings produced by RTCrShaCrypt512ToString().
     118 *
     119 *                              This approach is used by many *crypt implementations -- it allows feeding the user-provided
     120 *                              password and the crypted password from "the password file" to the function. If it returns the
     121 *                              same crypted password then the user-provided password must be the correct one.
    110122 * @param   cRounds             Number of rounds to use. @sa RT_SHACRYPT_DEFAULT_ROUNDS
    111123 * @param   abHash              Where to return the hash on success.
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette