DH_size.pod 949 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. =pod
  2. =head1 NAME
  3. DH_size, DH_bits - get Diffie-Hellman prime size
  4. =head1 SYNOPSIS
  5. #include <openssl/dh.h>
  6. int DH_size(const DH *dh);
  7. int DH_bits(const DH *dh);
  8. =head1 DESCRIPTION
  9. DH_size() returns the Diffie-Hellman prime size in bytes. It can be used
  10. to determine how much memory must be allocated for the shared secret
  11. computed by DH_compute_key().
  12. DH_bits() returns the number of significant bits.
  13. B<dh> and B<dh-E<gt>p> must not be B<NULL>.
  14. =head1 RETURN VALUE
  15. The size.
  16. =head1 SEE ALSO
  17. L<dh(3)>, L<DH_generate_key(3)>,
  18. L<BN_num_bits(3)>
  19. =head1 HISTORY
  20. DH_bits() was added in OpenSSL 1.1.0.
  21. =head1 COPYRIGHT
  22. Copyright 2000-2016 The OpenSSL Project Authors. All Rights Reserved.
  23. Licensed under the OpenSSL license (the "License"). You may not use
  24. this file except in compliance with the License. You can obtain a copy
  25. in the file LICENSE in the source distribution or at
  26. L<https://www.openssl.org/source/license.html>.
  27. =cut