@@ -200,8 +200,7 @@ SHA512_dealloc(PyObject *op)
200200 * 64 bits so we loop in <4gig chunks when needed. */
201201
202202static void
203- _hacl_sha2_state_update_256 (Hacl_Hash_SHA2_state_t_256 * state ,
204- uint8_t * buf , Py_ssize_t len )
203+ update_256 (Hacl_Hash_SHA2_state_t_256 * state , uint8_t * buf , Py_ssize_t len )
205204{
206205 /*
207206 * Note: we explicitly ignore the error code on the basis that it would
@@ -220,8 +219,7 @@ _hacl_sha2_state_update_256(Hacl_Hash_SHA2_state_t_256 *state,
220219}
221220
222221static void
223- _hacl_sha2_state_update_512 (Hacl_Hash_SHA2_state_t_512 * state ,
224- uint8_t * buf , Py_ssize_t len )
222+ update_512 (Hacl_Hash_SHA2_state_t_512 * state , uint8_t * buf , Py_ssize_t len )
225223{
226224 /*
227225 * Note: we explicitly ignore the error code on the basis that it would
@@ -408,7 +406,7 @@ SHA256Type_update_impl(SHA256object *self, PyObject *obj)
408406 GET_BUFFER_VIEW_OR_ERROUT (obj , & buf );
409407 HASHLIB_EXTERNAL_INSTRUCTIONS_LOCKED (
410408 self , buf .len ,
411- _hacl_sha2_state_update_256 (self -> state , buf .buf , buf .len )
409+ update_256 (self -> state , buf .buf , buf .len )
412410 );
413411 PyBuffer_Release (& buf );
414412 Py_RETURN_NONE ;
@@ -431,7 +429,7 @@ SHA512Type_update_impl(SHA512object *self, PyObject *obj)
431429 GET_BUFFER_VIEW_OR_ERROUT (obj , & buf );
432430 HASHLIB_EXTERNAL_INSTRUCTIONS_LOCKED (
433431 self , buf .len ,
434- _hacl_sha2_state_update_512 (self -> state , buf .buf , buf .len )
432+ update_512 (self -> state , buf .buf , buf .len )
435433 );
436434 PyBuffer_Release (& buf );
437435 Py_RETURN_NONE ;
@@ -616,7 +614,7 @@ _sha2_sha256_impl(PyObject *module, PyObject *data, int usedforsecurity,
616614 * where it is not yet possible to have concurrent access. */
617615 HASHLIB_EXTERNAL_INSTRUCTIONS_UNLOCKED (
618616 buf .len ,
619- _hacl_sha2_state_update_256 (new -> state , buf .buf , buf .len )
617+ update_256 (new -> state , buf .buf , buf .len )
620618 );
621619 PyBuffer_Release (& buf );
622620 }
@@ -674,7 +672,7 @@ _sha2_sha224_impl(PyObject *module, PyObject *data, int usedforsecurity,
674672 * where it is not yet possible to have concurrent access. */
675673 HASHLIB_EXTERNAL_INSTRUCTIONS_UNLOCKED (
676674 buf .len ,
677- _hacl_sha2_state_update_256 (new -> state , buf .buf , buf .len )
675+ update_256 (new -> state , buf .buf , buf .len )
678676 );
679677 PyBuffer_Release (& buf );
680678 }
@@ -733,7 +731,7 @@ _sha2_sha512_impl(PyObject *module, PyObject *data, int usedforsecurity,
733731 * where it is not yet possible to have concurrent access. */
734732 HASHLIB_EXTERNAL_INSTRUCTIONS_UNLOCKED (
735733 buf .len ,
736- _hacl_sha2_state_update_512 (new -> state , buf .buf , buf .len )
734+ update_512 (new -> state , buf .buf , buf .len )
737735 );
738736 PyBuffer_Release (& buf );
739737 }
@@ -792,7 +790,7 @@ _sha2_sha384_impl(PyObject *module, PyObject *data, int usedforsecurity,
792790 * where it is not yet possible to have concurrent access. */
793791 HASHLIB_EXTERNAL_INSTRUCTIONS_UNLOCKED (
794792 buf .len ,
795- _hacl_sha2_state_update_512 (new -> state , buf .buf , buf .len )
793+ update_512 (new -> state , buf .buf , buf .len )
796794 );
797795 PyBuffer_Release (& buf );
798796 }
0 commit comments