Skip to content

Commit 3366618

Browse files
tniessensxa
authored andcommitted
src: simplify GetExponentString
PR-URL: #42121 Reviewed-By: Filip Skokan <[email protected]> Reviewed-By: Darshan Sen <[email protected]>
1 parent 576c1ae commit 3366618

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

src/crypto/crypto_common.cc

+1-7
Original file line numberDiff line numberDiff line change
@@ -514,13 +514,7 @@ MaybeLocal<Value> GetExponentString(
514514
const BIOPointer& bio,
515515
const BIGNUM* e) {
516516
uint64_t exponent_word = static_cast<uint64_t>(BN_get_word(e));
517-
uint32_t lo = static_cast<uint32_t>(exponent_word);
518-
uint32_t hi = static_cast<uint32_t>(exponent_word >> 32);
519-
if (hi == 0)
520-
BIO_printf(bio.get(), "0x%x", lo);
521-
else
522-
BIO_printf(bio.get(), "0x%x%08x", hi, lo);
523-
517+
BIO_printf(bio.get(), "0x%" PRIx64, exponent_word);
524518
return ToV8Value(env, bio);
525519
}
526520

0 commit comments

Comments
 (0)