VirtualBox

Changeset 102297 in vbox for trunk/include


Ignore:
Timestamp:
Nov 24, 2023 4:32:03 PM (13 months ago)
Author:
vboxsync
Message:

IPRT/crypto/shacrypt: Better string length checks for RTCrShaCryptXXXToString(). bugref:10551

File:
1 edited

Legend:

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

    r102296 r102297  
    8181 * @param   cRounds             Number of rounds used for generating \a pabHash.
    8282 * @param   pszString           Where to store the printable string on success.
    83  * @param   cbString            Size (in bytes) of \a pszString.
     83 * @param   cchString           Size of \a pszString.
     84 *                              Should be at least RTSHA256_DIGEST_LEN + 1 bytes.
    8485 *
    8586 * @note    This implements step 22 of SHA-crypt.txt Version: 0.6 2016-8-31.
    8687 */
    87 RTR3DECL(int) RTCrShaCrypt256ToString(uint8_t abHash[RTSHA256_HASH_SIZE], const char *pszSalt, uint32_t cRounds, char *pszString, size_t cbString);
     88RTR3DECL(int) RTCrShaCrypt256ToString(uint8_t abHash[RTSHA256_HASH_SIZE], const char *pszSalt, uint32_t cRounds, char *pszString, size_t cchString);
    8889
    8990
     
    111112 * @param   cRounds             Number of rounds used for generating \a pabHash.
    112113 * @param   pszString           Where to store the printable string on success.
    113  * @param   cbString            Size (in bytes) of \a pszString.
     114 * @param   cchString           Size of \a pszString.
     115 *                              Should be at least RTSHA512_DIGEST_LEN + 1 bytes.
    114116 *
    115117 * @note    This implements step 22 of SHA-crypt.txt Version: 0.6 2016-8-31.
    116118 */
    117 RTR3DECL(int) RTCrShaCrypt512ToString(uint8_t abHash[RTSHA512_HASH_SIZE], const char *pszSalt, uint32_t cRounds, char *pszString, size_t cbString);
     119RTR3DECL(int) RTCrShaCrypt512ToString(uint8_t abHash[RTSHA512_HASH_SIZE], const char *pszSalt, uint32_t cRounds, char *pszString, size_t cchString);
    118120
    119121/** @} */
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