@@ -19,10 +19,10 @@ namespace OpenShock {
1919 MD5 () { mbedtls_md5_init (&ctx); }
2020 ~MD5 () { mbedtls_md5_free (&ctx); }
2121
22- inline bool begin () { return mbedtls_md5_starts_ret (&ctx) == 0 ; }
23- inline bool update (const uint8_t * data, std::size_t dataLen) { return mbedtls_md5_update_ret (&ctx, data, dataLen) == 0 ; }
22+ inline bool begin () { return mbedtls_md5_starts (&ctx) == 0 ; }
23+ inline bool update (const uint8_t * data, std::size_t dataLen) { return mbedtls_md5_update (&ctx, data, dataLen) == 0 ; }
2424 inline bool update (std::string_view data) { return update (reinterpret_cast <const uint8_t *>(data.data ()), data.length ()); }
25- inline bool finish (std::array<uint8_t , 16 >& hash) { return mbedtls_md5_finish_ret (&ctx, hash.data ()) == 0 ; }
25+ inline bool finish (std::array<uint8_t , 16 >& hash) { return mbedtls_md5_finish (&ctx, hash.data ()) == 0 ; }
2626
2727 private:
2828 mbedtls_md5_context ctx;
@@ -35,10 +35,10 @@ namespace OpenShock {
3535 SHA1 () { mbedtls_sha1_init (&ctx); }
3636 ~SHA1 () { mbedtls_sha1_free (&ctx); }
3737
38- inline bool begin () { return mbedtls_sha1_starts_ret (&ctx) == 0 ; }
39- inline bool update (const uint8_t * data, std::size_t dataLen) { return mbedtls_sha1_update_ret (&ctx, data, dataLen) == 0 ; }
38+ inline bool begin () { return mbedtls_sha1_starts (&ctx) == 0 ; }
39+ inline bool update (const uint8_t * data, std::size_t dataLen) { return mbedtls_sha1_update (&ctx, data, dataLen) == 0 ; }
4040 inline bool update (std::string_view data) { return update (reinterpret_cast <const uint8_t *>(data.data ()), data.length ()); }
41- inline bool finish (std::array<uint8_t , 20 >& hash) { return mbedtls_sha1_finish_ret (&ctx, hash.data ()) == 0 ; }
41+ inline bool finish (std::array<uint8_t , 20 >& hash) { return mbedtls_sha1_finish (&ctx, hash.data ()) == 0 ; }
4242
4343 private:
4444 mbedtls_sha1_context ctx;
@@ -51,10 +51,10 @@ namespace OpenShock {
5151 SHA256 () { mbedtls_sha256_init (&ctx); }
5252 ~SHA256 () { mbedtls_sha256_free (&ctx); }
5353
54- inline bool begin () { return mbedtls_sha256_starts_ret (&ctx, 0 ) == 0 ; }
55- inline bool update (const uint8_t * data, std::size_t dataLen) { return mbedtls_sha256_update_ret (&ctx, data, dataLen) == 0 ; }
54+ inline bool begin () { return mbedtls_sha256_starts (&ctx, 0 ) == 0 ; }
55+ inline bool update (const uint8_t * data, std::size_t dataLen) { return mbedtls_sha256_update (&ctx, data, dataLen) == 0 ; }
5656 inline bool update (std::string_view data) { return update (reinterpret_cast <const uint8_t *>(data.data ()), data.length ()); }
57- inline bool finish (std::array<uint8_t , 32 >& hash) { return mbedtls_sha256_finish_ret (&ctx, hash.data ()) == 0 ; }
57+ inline bool finish (std::array<uint8_t , 32 >& hash) { return mbedtls_sha256_finish (&ctx, hash.data ()) == 0 ; }
5858
5959 private:
6060 mbedtls_sha256_context ctx;
0 commit comments