EVP_PKEY_CTX_set1_pbe_pass.pod 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. =pod
  2. =head1 NAME
  3. EVP_PKEY_CTX_set1_pbe_pass
  4. - generic KDF support functions
  5. =head1 SYNOPSIS
  6. #include <openssl/kdf.h>
  7. int EVP_PKEY_CTX_set1_pbe_pass(EVP_PKEY_CTX *pctx, unsigned char *pass,
  8. int passlen);
  9. =head1 DESCRIPTION
  10. These functions are generic support functions for all KDF algorithms.
  11. EVP_PKEY_CTX_set1_pbe_pass() sets the password to the B<passlen> first
  12. bytes from B<pass>.
  13. =begin comment
  14. We really should have a few more, such as EVP_PKEY_CTX_set1_kdf_salt,
  15. EVP_PKEY_CTX_set1_kdf_key (to be used by the algorithms that use a
  16. key, such as hkdf), EVP_PKEY_CTX_set1_kdf_md (same thing here).
  17. =end comment
  18. =head1 STRING CTRLS
  19. There is also support for string based control operations via
  20. L<EVP_PKEY_CTX_ctrl_str(3)>.
  21. The B<password> can be directly specified using the B<type> parameter
  22. "pass" or given in hex encoding using the "hexpass" parameter.
  23. =begin comment
  24. Just as for the function description, the strings "salt", "hexsalt",
  25. "key", "hexkey" and "md" should be generically specified, and
  26. supported by the algorithms that use them.
  27. =end comment
  28. =head1 NOTES
  29. All these functions are implemented as macros.
  30. =head1 RETURN VALUES
  31. All these functions return 1 for success and 0 or a negative value for failure.
  32. In particular a return value of -2 indicates the operation is not supported by
  33. the public key algorithm.
  34. =head1 SEE ALSO
  35. L<EVP_PKEY_CTX_new(3)>,
  36. L<EVP_PKEY_CTX_ctrl_str(3)>,
  37. L<EVP_PKEY_derive(3)>
  38. =head1 COPYRIGHT
  39. Copyright 2018 The OpenSSL Project Authors. All Rights Reserved.
  40. Licensed under the OpenSSL license (the "License"). You may not use
  41. this file except in compliance with the License. You can obtain a copy
  42. in the file LICENSE in the source distribution or at
  43. L<https://www.openssl.org/source/license.html>.
  44. =cut