mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-23 13:35:41 +01:00
Add explanation for okm_string size
Add explanation for why the size of `okm_string` buffer is twice as `okm` buffer.
This commit is contained in:
parent
cdfe0bcad8
commit
1a3a7e5fc7
@ -19,6 +19,10 @@ void test_hkdf( int md_alg, char *hex_ikm_string, char *hex_salt_string,
|
|||||||
unsigned char info[128] = { '\0' };
|
unsigned char info[128] = { '\0' };
|
||||||
unsigned char expected_okm[128] = { '\0' };
|
unsigned char expected_okm[128] = { '\0' };
|
||||||
unsigned char okm[128] = { '\0' };
|
unsigned char okm[128] = { '\0' };
|
||||||
|
/*
|
||||||
|
* okm_string is the string representation of okm,
|
||||||
|
* so its size is twice as the size of okm.
|
||||||
|
*/
|
||||||
unsigned char okm_string[256] = { '\0' };
|
unsigned char okm_string[256] = { '\0' };
|
||||||
|
|
||||||
const mbedtls_md_info_t *md = mbedtls_md_info_from_type( md_alg );
|
const mbedtls_md_info_t *md = mbedtls_md_info_from_type( md_alg );
|
||||||
|
Loading…
Reference in New Issue
Block a user