Changeset 102294 in vbox
- Timestamp:
- Nov 24, 2023 1:40:35 PM (12 months ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/crypto/shacrypt.h
r102292 r102294 60 60 * Must be >= RT_SHACRYPT_MIN_SALT_LEN and <= RT_SHACRYPT_MAX_SALT_LEN. 61 61 * @param cRounds Number of rounds to use. 62 * @param pabHashWhere to return the hash on success.62 * @param abHash Where to return the hash on success. 63 63 * 64 64 * @note This implements SHA-crypt.txt Version: 0.6 2016-8-31. 65 65 */ 66 RTR3DECL(int) RTShaCrypt256(const char *pszKey, const char *pszSalt, uint32_t cRounds, uint8_t pabHash[RTSHA256_HASH_SIZE]);66 RTR3DECL(int) RTShaCrypt256(const char *pszKey, const char *pszSalt, uint32_t cRounds, uint8_t abHash[RTSHA256_HASH_SIZE]); 67 67 68 68 /** … … 70 70 * 71 71 * @returns VBox status code. 72 * @param pabHashSHAcrypt (SHA-256) digest to return printable scheme for.72 * @param abHash SHAcrypt (SHA-256) digest to return printable scheme for. 73 73 * @param pszSalt Salt to use. Must match the salt used when generating \a pabHash via RTSha256Crypt(). 74 74 * @param cRounds Number of rounds used for generating \a pabHash. … … 89 89 * Must be >= RT_SHACRYPT_MIN_SALT_LEN and <= RT_SHACRYPT_MAX_SALT_LEN. 90 90 * @param cRounds Number of rounds to use. 91 * @param pabHashWhere to return the hash on success.91 * @param abHash Where to return the hash on success. 92 92 * 93 93 * @note This implements SHA-crypt.txt Version: 0.6 2016-8-31. 94 94 */ 95 RTR3DECL(int) RTShaCrypt512(const char *pszKey, const char * szSalt, uint32_t cRounds, uint8_t pabHash[RTSHA512_HASH_SIZE]);95 RTR3DECL(int) RTShaCrypt512(const char *pszKey, const char *pszSalt, uint32_t cRounds, uint8_t abHash[RTSHA512_HASH_SIZE]); 96 96 97 97 … … 100 100 * 101 101 * @returns VBox status code. 102 * @param pabHashSHAcrypt (SHA-512) digest to return printable scheme for.102 * @param abHash SHAcrypt (SHA-512) digest to return printable scheme for. 103 103 * @param pszSalt Salt to use. Must match the salt used when generating \a pabHash via RTSha512Crypt(). 104 104 * @param cRounds Number of rounds used for generating \a pabHash. -
trunk/src/VBox/Runtime/common/crypto/shacrypt.cpp
r102292 r102294 48 48 49 49 50 RTR3DECL(int) RTShaCrypt256(const char *pszKey, const char *pszSalt, uint32_t cRounds, uint8_t pabHash[RTSHA256_HASH_SIZE])50 RTR3DECL(int) RTShaCrypt256(const char *pszKey, const char *pszSalt, uint32_t cRounds, uint8_t abHash[RTSHA256_HASH_SIZE]) 51 51 { 52 52 AssertPtrReturn(pszKey, VERR_INVALID_POINTER); … … 159 159 } 160 160 161 memcpy( pabHash, abDigest, RTSHA256_HASH_SIZE);161 memcpy(abHash, abDigest, RTSHA256_HASH_SIZE); 162 162 163 163 RTMemWipeThoroughly(abDigestTemp, RTSHA256_HASH_SIZE, 3); … … 222 222 223 223 224 RTR3DECL(int) RTShaCrypt512(const char *pszKey, const char *pszSalt, uint32_t cRounds, uint8_t pabHash[RTSHA512_HASH_SIZE])224 RTR3DECL(int) RTShaCrypt512(const char *pszKey, const char *pszSalt, uint32_t cRounds, uint8_t abHash[RTSHA512_HASH_SIZE]) 225 225 { 226 226 AssertPtrReturn(pszKey, VERR_INVALID_POINTER); … … 333 333 } 334 334 335 memcpy( pabHash, abDigest, RTSHA512_HASH_SIZE);335 memcpy(abHash, abDigest, RTSHA512_HASH_SIZE); 336 336 337 337 RTMemWipeThoroughly(abDigestTemp, RTSHA512_HASH_SIZE, 3);
Note:
See TracChangeset
for help on using the changeset viewer.