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