RSA_size.pod 652 字节
Newer Older
U
Ulf Möller 已提交
1 2 3 4
=pod

=head1 NAME

5
RSA_size, RSA_bits - get RSA modulus size
U
Ulf Möller 已提交
6 7 8

=head1 SYNOPSIS

9
#include <openssl/rsa.h>
U
Ulf Möller 已提交
10

11 12 13
int RSA_size(const RSA *rsa);

int RSA_bits(const RSA *rsa);
U
Ulf Möller 已提交
14 15 16

=head1 DESCRIPTION

17
RSA_size() returns the RSA modulus size in bytes. It can be used to
U
Ulf Möller 已提交
18 19 20
determine how much memory must be allocated for an RSA encrypted
value.

21 22 23
RSA_bits() returns the number of significant bits.

B<rsa> and B<rsa-E<gt>n> must not be B<NULL>.
U
Ulf Möller 已提交
24 25 26

=head1 RETURN VALUE

27
The size.
U
Ulf Möller 已提交
28 29 30

=head1 SEE ALSO

31
L<rsa(3)|rsa(3)>, L<BN_num_bits(3)|BN_num_bits(3)>
U
Ulf Möller 已提交
32 33 34 35

=head1 HISTORY

RSA_size() is available in all versions of SSLeay and OpenSSL.
36
RSA_bits() was added in OpenSSL 1.1.0.
U
Ulf Möller 已提交
37 38

=cut