Skip to content
Permalink
Browse files
src: simplify GetExponentString
PR-URL: #42121
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
  • Loading branch information
tniessen authored and danielleadams committed Apr 24, 2022
1 parent 6b55ba2 commit e77a7cf98586aec347961d389d6157ca41bed2bd
Showing with 1 addition and 7 deletions.
  1. +1 −7 src/crypto/crypto_common.cc
@@ -514,13 +514,7 @@ MaybeLocal<Value> GetExponentString(
const BIOPointer& bio,
const BIGNUM* e) {
uint64_t exponent_word = static_cast<uint64_t>(BN_get_word(e));
uint32_t lo = static_cast<uint32_t>(exponent_word);
uint32_t hi = static_cast<uint32_t>(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);
}

0 comments on commit e77a7cf

Please sign in to comment.