| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 25bc7fe commit b7e661b
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -3591,13 +3591,10 @@ void Hmac::HmacInit(const char* hash_type, const char* key, int key_len) { | |||
| 3591 | 3591 | return env()->ThrowError("Unknown message digest"); | |
| 3592 | 3592 | } | |
| 3593 | 3593 | HMAC_CTX_init(&ctx_); | |
| 3594 | - int result = 0; | ||
| 3595 | 3594 | if (key_len == 0) { | |
| 3596 | - result = HMAC_Init(&ctx_, "", 0, md); | ||
| 3597 | - } else { | ||
| 3598 | - result = HMAC_Init(&ctx_, key, key_len, md); | ||
| 3595 | + key = ""; | ||
| 3599 | 3596 | } | |
| 3600 | - if (!result) { | ||
| 3597 | + if (!HMAC_Init(&ctx_, key, key_len, md)) { | ||
| 3601 | 3598 | return ThrowCryptoError(env(), ERR_get_error()); | |
| 3602 | 3599 | } | |
| 3603 | 3600 | initialised_ = true; | |
| Back | FazBrowse Home | New Git URL |
0 commit comments