⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rsa_generate_key.pod

📁 开源的ssl算法openssl,版本0.9.8H
💻 POD
字号:
=pod=head1 NAMERSA_generate_key - generate RSA key pair=head1 SYNOPSIS #include <openssl/rsa.h> RSA *RSA_generate_key(int num, unsigned long e,    void (*callback)(int,int,void *), void *cb_arg);=head1 DESCRIPTIONRSA_generate_key() generates a key pair and returns it in a newlyallocated B<RSA> structure. The pseudo-random number generator mustbe seeded prior to calling RSA_generate_key().The modulus size will be B<num> bits, and the public exponent will beB<e>. Key sizes with B<num> E<lt> 1024 should be considered insecure.The exponent is an odd number, typically 3, 17 or 65537.A callback function may be used to provide feedback about theprogress of the key generation. If B<callback> is not B<NULL>, itwill be called as follows:=over 4=item *While a random prime number is generated, it is called asdescribed in L<BN_generate_prime(3)|BN_generate_prime(3)>.=item *When the n-th randomly generated prime is rejected as notsuitable for the key, B<callback(2, n, cb_arg)> is called.=item *When a random p has been found with p-1 relatively prime to B<e>,it is called as B<callback(3, 0, cb_arg)>.=backThe process is then repeated for prime q with B<callback(3, 1, cb_arg)>.=head1 RETURN VALUEIf key generation fails, RSA_generate_key() returns B<NULL>; theerror codes can be obtained by L<ERR_get_error(3)|ERR_get_error(3)>.=head1 BUGSB<callback(2, x, cb_arg)> is used with two different meanings.RSA_generate_key() goes into an infinite loop for illegal input values.=head1 SEE ALSOL<ERR_get_error(3)|ERR_get_error(3)>, L<rand(3)|rand(3)>, L<rsa(3)|rsa(3)>,L<RSA_free(3)|RSA_free(3)>=head1 HISTORYThe B<cb_arg> argument was added in SSLeay 0.9.0.=cut

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -