Skip to content

Commit 9d416eb

Browse files
armfazhfredlawl
authored andcommitted
Fixing format of documentation strings for SHA2.
1 parent 4f107a8 commit 9d416eb

1 file changed

Lines changed: 42 additions & 40 deletions

File tree

crypto/sha2-hacl-generated.c

Lines changed: 42 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -191,9 +191,9 @@ void Hacl_SHA2_Scalar32_sha224_finish(uint32_t *st, uint8_t *h)
191191
memcpy(h, hbuf, (uint32_t)28U * sizeof(uint8_t));
192192
}
193193

194-
/**
195-
Reset an existing state to the initial hash state with empty data.
196-
*/
194+
/*
195+
* Reset an existing state to the initial hash state with empty data.
196+
*/
197197

198198
void Hacl_Streaming_SHA2_init_256(struct Hacl_Streaming_MD_state_32_s *s)
199199
{
@@ -347,26 +347,27 @@ update_224_256(struct Hacl_Streaming_MD_state_32_s *p, uint8_t *data,
347347
return Hacl_Streaming_Types_Success;
348348
}
349349

350-
/**
351-
Feed an arbitrary amount of data into the hash. This function returns 0 for
352-
success, or 1 if the combined length of all of the data passed to `update_256`
353-
(since the last call to `init_256`) exceeds 2^61-1 bytes.
354-
355-
This function is identical to the update function for SHA2_224.
356-
*/
350+
/*
351+
* Feed an arbitrary amount of data into the hash. This function returns 0 for
352+
* success, or 1 if the combined length of all of the data passed to
353+
* `update_256` (since the last call to `init_256`) exceeds 2^61-1 bytes.
354+
*
355+
* This function is identical to the update function for SHA2_224.
356+
*/
357357
Hacl_Streaming_Types_error_code
358358
Hacl_Streaming_SHA2_update_256(struct Hacl_Streaming_MD_state_32_s *p,
359359
uint8_t *input, uint32_t input_len)
360360
{
361361
return update_224_256(p, input, input_len);
362362
}
363363

364-
/**
365-
Write the resulting hash into `dst`, an array of 32 bytes. The state remains
366-
valid after a call to `finish_256`, meaning the user may feed more data into
367-
the hash via `update_256`. (The finish_256 function operates on an internal copy
368-
of the state and therefore does not invalidate the client-held state `p`.)
369-
*/
364+
/*
365+
* Write the resulting hash into `dst`, an array of 32 bytes. The state remains
366+
* valid after a call to `finish_256`, meaning the user may feed more data into
367+
* the hash via `update_256`. (The finish_256 function operates on an internal
368+
* copy of the state and therefore does not invalidate the client-held state
369+
* `p`.)
370+
*/
370371
void Hacl_Streaming_SHA2_finish_256(struct Hacl_Streaming_MD_state_32_s *p,
371372
uint8_t *dst)
372373
{
@@ -400,9 +401,9 @@ void Hacl_Streaming_SHA2_finish_256(struct Hacl_Streaming_MD_state_32_s *p,
400401
Hacl_SHA2_Scalar32_sha256_finish(tmp_block_state, dst);
401402
}
402403

403-
/**
404-
Hash `input`, of len `input_len`, into `dst`, an array of 32 bytes.
405-
*/
404+
/*
405+
* Hash `input`, of len `input_len`, into `dst`, an array of 32 bytes.
406+
*/
406407
void Hacl_Streaming_SHA2_hash_256(uint8_t *input, uint32_t input_len,
407408
uint8_t *dst)
408409
{
@@ -441,11 +442,11 @@ Hacl_Streaming_SHA2_update_224(struct Hacl_Streaming_MD_state_32_s *p,
441442
return update_224_256(p, input, input_len);
442443
}
443444

444-
/**
445-
Write the resulting hash into `dst`, an array of 28 bytes. The state remains
446-
valid after a call to `finish_224`, meaning the user may feed more data into
447-
the hash via `update_224`.
448-
*/
445+
/*
446+
* Write the resulting hash into `dst`, an array of 28 bytes. The state remains
447+
* valid after a call to `finish_224`, meaning the user may feed more data into
448+
* the hash via `update_224`.
449+
*/
449450
void Hacl_Streaming_SHA2_finish_224(struct Hacl_Streaming_MD_state_32_s *p,
450451
uint8_t *dst)
451452
{
@@ -478,9 +479,9 @@ void Hacl_Streaming_SHA2_finish_224(struct Hacl_Streaming_MD_state_32_s *p,
478479
Hacl_SHA2_Scalar32_sha224_finish(tmp_block_state, dst);
479480
}
480481

481-
/**
482-
Hash `input`, of len `input_len`, into `dst`, an array of 28 bytes.
483-
*/
482+
/*
483+
* Hash `input`, of len `input_len`, into `dst`, an array of 28 bytes.
484+
*/
484485
void Hacl_Streaming_SHA2_hash_224(uint8_t *input, uint32_t input_len,
485486
uint8_t *dst)
486487
{
@@ -836,26 +837,27 @@ update_384_512(struct Hacl_Streaming_MD_state_64_s *p, uint8_t *data,
836837
return Hacl_Streaming_Types_Success;
837838
}
838839

839-
/**
840-
Feed an arbitrary amount of data into the hash. This function returns 0 for
841-
success, or 1 if the combined length of all of the data passed to `update_512`
842-
(since the last call to `init_512`) exceeds 2^125-1 bytes.
843-
844-
This function is identical to the update function for SHA2_384.
845-
*/
840+
/*
841+
* Feed an arbitrary amount of data into the hash. This function returns 0 for
842+
* success, or 1 if the combined length of all of the data passed to
843+
* `update_512` (since the last call to `init_512`) exceeds 2^125-1 bytes.
844+
*
845+
* This function is identical to the update function for SHA2_384.
846+
*/
846847
Hacl_Streaming_Types_error_code
847848
Hacl_Streaming_SHA2_update_512(struct Hacl_Streaming_MD_state_64_s *p,
848849
uint8_t *input, uint32_t input_len)
849850
{
850851
return update_384_512(p, input, input_len);
851852
}
852853

853-
/**
854-
Write the resulting hash into `dst`, an array of 64 bytes. The state remains
855-
valid after a call to `finish_512`, meaning the user may feed more data into
856-
the hash via `update_512`. (The finish_512 function operates on an internal copy
857-
of the state and therefore does not invalidate the client-held state `p`.)
858-
*/
854+
/*
855+
* Write the resulting hash into `dst`, an array of 64 bytes. The state remains
856+
* valid after a call to `finish_512`, meaning the user may feed more data into
857+
* the hash via `update_512`. (The finish_512 function operates on an internal
858+
* copy of the state and therefore does not invalidate the client-held state
859+
* `p`.)
860+
*/
859861
void Hacl_Streaming_SHA2_finish_512(struct Hacl_Streaming_MD_state_64_s *p,
860862
uint8_t *dst)
861863
{

0 commit comments

Comments
 (0)