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

📄 dh_generate_key.pod

📁 开源的ssl算法openssl,版本0.9.8H
💻 POD
字号:
=pod=head1 NAMEDH_generate_key, DH_compute_key - perform Diffie-Hellman key exchange=head1 SYNOPSIS #include <openssl/dh.h> int DH_generate_key(DH *dh); int DH_compute_key(unsigned char *key, BIGNUM *pub_key, DH *dh);=head1 DESCRIPTIONDH_generate_key() performs the first step of a Diffie-Hellman keyexchange by generating private and public DH values. By callingDH_compute_key(), these are combined with the other party's publicvalue to compute the shared key.DH_generate_key() expects B<dh> to contain the shared parametersB<dh-E<gt>p> and B<dh-E<gt>g>. It generates a random private DH valueunless B<dh-E<gt>priv_key> is already set, and computes thecorresponding public value B<dh-E<gt>pub_key>, which can then bepublished.DH_compute_key() computes the shared secret from the private DH valuein B<dh> and the other party's public value in B<pub_key> and storesit in B<key>. B<key> must point to B<DH_size(dh)> bytes of memory.=head1 RETURN VALUESDH_generate_key() returns 1 on success, 0 otherwise.DH_compute_key() returns the size of the shared secret on success, -1on error.The error codes can be obtained by L<ERR_get_error(3)|ERR_get_error(3)>.=head1 SEE ALSOL<dh(3)|dh(3)>, L<ERR_get_error(3)|ERR_get_error(3)>, L<rand(3)|rand(3)>, L<DH_size(3)|DH_size(3)>=head1 HISTORYDH_generate_key() and DH_compute_key() are available in all versionsof SSLeay and OpenSSL.=cut

⌨️ 快捷键说明

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