From e90222c7adb4edd5060ed35c11f39e1a3b7a3e76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20Nie=C3=9Fen?= Date: Thu, 24 Feb 2022 20:00:56 +0000 Subject: [PATCH] src: simplify GetExponentString --- src/crypto/crypto_common.cc | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/crypto/crypto_common.cc b/src/crypto/crypto_common.cc index dce0774e8fa632..1e3060517a3afb 100644 --- a/src/crypto/crypto_common.cc +++ b/src/crypto/crypto_common.cc @@ -518,13 +518,7 @@ MaybeLocal GetExponentString( const BIOPointer& bio, const BIGNUM* e) { uint64_t exponent_word = static_cast(BN_get_word(e)); - uint32_t lo = static_cast(exponent_word); - uint32_t hi = static_cast(exponent_word >> 32); - if (hi == 0) - BIO_printf(bio.get(), "0x%x", lo); - else - BIO_printf(bio.get(), "0x%x%08x", hi, lo); - + BIO_printf(bio.get(), "0x%" PRIx64, exponent_word); return ToV8Value(env, bio); }