Loading crypto/dh/dh_lib.c +5 −0 Original line number Diff line number Diff line Loading @@ -237,6 +237,11 @@ void *DH_get_ex_data(DH *d, int idx) return (CRYPTO_get_ex_data(&d->ex_data, idx)); } int DH_bits(const DH *dh) { return BN_num_bits(dh->p); } int DH_size(const DH *dh) { return (BN_num_bytes(dh->p)); Loading crypto/rsa/rsa_crpt.c +5 −0 Original line number Diff line number Diff line Loading @@ -64,6 +64,11 @@ #include <openssl/rsa.h> #include <openssl/rand.h> int RSA_bits(const RSA *r) { return (BN_num_bits(r->n)); } int RSA_size(const RSA *r) { return (BN_num_bytes(r->n)); Loading doc/crypto/DH_size.pod +13 −7 Original line number Diff line number Diff line Loading @@ -2,32 +2,38 @@ =head1 NAME DH_size - get Diffie-Hellman prime size DH_size, DH_bits - get Diffie-Hellman prime size =head1 SYNOPSIS #include <openssl/dh.h> int DH_size(DH *dh); int DH_size(const DH *dh); int DH_bits(const DH *dh); =head1 DESCRIPTION This function returns the Diffie-Hellman size in bytes. It can be used DH_size() returns the Diffie-Hellman prime size in bytes. It can be used to determine how much memory must be allocated for the shared secret computed by DH_compute_key(). B<dh-E<gt>p> must not be B<NULL>. DH_bits() returns the number of significant bits. B<dh> and B<dh-E<gt>p> must not be B<NULL>. =head1 RETURN VALUE The size in bytes. The size. =head1 SEE ALSO L<dh(3)|dh(3)>, L<DH_generate_key(3)|DH_generate_key(3)> L<dh(3)|dh(3)>, L<DH_generate_key(3)|DH_generate_key(3)>, L<BN_num_bits(3)|BN_num_bits(3)> =head1 HISTORY DH_size() is available in all versions of SSLeay and OpenSSL. DH_bits() was added in OpenSSL 1.1.0. =cut doc/crypto/RSA_size.pod +12 −7 Original line number Diff line number Diff line Loading @@ -2,7 +2,7 @@ =head1 NAME RSA_size - get RSA modulus size RSA_size, RSA_bits - get RSA modulus size =head1 SYNOPSIS Loading @@ -10,24 +10,29 @@ RSA_size - get RSA modulus size int RSA_size(const RSA *rsa); int RSA_bits(const RSA *rsa); =head1 DESCRIPTION This function returns the RSA modulus size in bytes. It can be used to RSA_size() returns the RSA modulus size in bytes. It can be used to determine how much memory must be allocated for an RSA encrypted value. B<rsa-E<gt>n> must not be B<NULL>. RSA_bits() returns the number of significant bits. B<rsa> and B<rsa-E<gt>n> must not be B<NULL>. =head1 RETURN VALUE The size in bytes. The size. =head1 SEE ALSO L<rsa(3)|rsa(3)> L<rsa(3)|rsa(3)>, L<BN_num_bits(3)|BN_num_bits(3)> =head1 HISTORY RSA_size() is available in all versions of SSLeay and OpenSSL. RSA_bits() was added in OpenSSL 1.1.0. =cut doc/crypto/dh.pod +0 −2 Original line number Diff line number Diff line Loading @@ -12,8 +12,6 @@ dh - Diffie-Hellman key agreement DH * DH_new(void); void DH_free(DH *dh); int DH_size(const DH *dh); DH * DH_generate_parameters(int prime_len, int generator, void (*callback)(int, int, void *), void *cb_arg); int DH_check(const DH *dh, int *codes); Loading Loading
crypto/dh/dh_lib.c +5 −0 Original line number Diff line number Diff line Loading @@ -237,6 +237,11 @@ void *DH_get_ex_data(DH *d, int idx) return (CRYPTO_get_ex_data(&d->ex_data, idx)); } int DH_bits(const DH *dh) { return BN_num_bits(dh->p); } int DH_size(const DH *dh) { return (BN_num_bytes(dh->p)); Loading
crypto/rsa/rsa_crpt.c +5 −0 Original line number Diff line number Diff line Loading @@ -64,6 +64,11 @@ #include <openssl/rsa.h> #include <openssl/rand.h> int RSA_bits(const RSA *r) { return (BN_num_bits(r->n)); } int RSA_size(const RSA *r) { return (BN_num_bytes(r->n)); Loading
doc/crypto/DH_size.pod +13 −7 Original line number Diff line number Diff line Loading @@ -2,32 +2,38 @@ =head1 NAME DH_size - get Diffie-Hellman prime size DH_size, DH_bits - get Diffie-Hellman prime size =head1 SYNOPSIS #include <openssl/dh.h> int DH_size(DH *dh); int DH_size(const DH *dh); int DH_bits(const DH *dh); =head1 DESCRIPTION This function returns the Diffie-Hellman size in bytes. It can be used DH_size() returns the Diffie-Hellman prime size in bytes. It can be used to determine how much memory must be allocated for the shared secret computed by DH_compute_key(). B<dh-E<gt>p> must not be B<NULL>. DH_bits() returns the number of significant bits. B<dh> and B<dh-E<gt>p> must not be B<NULL>. =head1 RETURN VALUE The size in bytes. The size. =head1 SEE ALSO L<dh(3)|dh(3)>, L<DH_generate_key(3)|DH_generate_key(3)> L<dh(3)|dh(3)>, L<DH_generate_key(3)|DH_generate_key(3)>, L<BN_num_bits(3)|BN_num_bits(3)> =head1 HISTORY DH_size() is available in all versions of SSLeay and OpenSSL. DH_bits() was added in OpenSSL 1.1.0. =cut
doc/crypto/RSA_size.pod +12 −7 Original line number Diff line number Diff line Loading @@ -2,7 +2,7 @@ =head1 NAME RSA_size - get RSA modulus size RSA_size, RSA_bits - get RSA modulus size =head1 SYNOPSIS Loading @@ -10,24 +10,29 @@ RSA_size - get RSA modulus size int RSA_size(const RSA *rsa); int RSA_bits(const RSA *rsa); =head1 DESCRIPTION This function returns the RSA modulus size in bytes. It can be used to RSA_size() returns the RSA modulus size in bytes. It can be used to determine how much memory must be allocated for an RSA encrypted value. B<rsa-E<gt>n> must not be B<NULL>. RSA_bits() returns the number of significant bits. B<rsa> and B<rsa-E<gt>n> must not be B<NULL>. =head1 RETURN VALUE The size in bytes. The size. =head1 SEE ALSO L<rsa(3)|rsa(3)> L<rsa(3)|rsa(3)>, L<BN_num_bits(3)|BN_num_bits(3)> =head1 HISTORY RSA_size() is available in all versions of SSLeay and OpenSSL. RSA_bits() was added in OpenSSL 1.1.0. =cut
doc/crypto/dh.pod +0 −2 Original line number Diff line number Diff line Loading @@ -12,8 +12,6 @@ dh - Diffie-Hellman key agreement DH * DH_new(void); void DH_free(DH *dh); int DH_size(const DH *dh); DH * DH_generate_parameters(int prime_len, int generator, void (*callback)(int, int, void *), void *cb_arg); int DH_check(const DH *dh, int *codes); Loading