]> git.ipfire.org Git - thirdparty/openssl.git/commit
Add ossl_num_bits(), which returns the significant number of bits in a size_t
authorRichard Levitte <levitte@openssl.org>
Mon, 24 Nov 2025 13:26:42 +0000 (14:26 +0100)
committerRichard Levitte <levitte@openssl.org>
Thu, 11 Dec 2025 09:35:46 +0000 (10:35 +0100)
commit17c679fd808da87e82863466cbd2bb40b3d7ad48
treea84c2d8b3f2fa2d1d2c0a52754d1786527327ab2
parent235116c33eb6c9028dc9feeecea71b2f94e4e3a8
Add ossl_num_bits(), which returns the significant number of bits in a size_t

This existed as an isolated static function in crypto/asn1/x_long.c, but
is really a pretty generic integer function, so it will serve better by
being exactly that.

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/29203)
crypto/asn1/x_long.c
crypto/build.info
crypto/int.c [new file with mode: 0644]
include/crypto/cryptlib.h